mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
init: disable autoupdate on netboot
TODO: rework settings addon to disable update settings / not run update thread closes #1653, closes #2291
This commit is contained in:
parent
1c19cc3c02
commit
19691ff47a
@ -285,15 +285,19 @@
|
|||||||
;;
|
;;
|
||||||
CIFS=*|SMB=*)
|
CIFS=*|SMB=*)
|
||||||
MOUNT_CMD="mount_cifs"
|
MOUNT_CMD="mount_cifs"
|
||||||
|
UPDATE_DISABLED=yes
|
||||||
;;
|
;;
|
||||||
ISCSI=*)
|
ISCSI=*)
|
||||||
MOUNT_CMD="mount_iscsi"
|
MOUNT_CMD="mount_iscsi"
|
||||||
|
UPDATE_DISABLED=yes
|
||||||
;;
|
;;
|
||||||
NBD=*)
|
NBD=*)
|
||||||
MOUNT_CMD="mount_nbd"
|
MOUNT_CMD="mount_nbd"
|
||||||
|
UPDATE_DISABLED=yes
|
||||||
;;
|
;;
|
||||||
NFS=*)
|
NFS=*)
|
||||||
MOUNT_CMD="mount_nfs"
|
MOUNT_CMD="mount_nfs"
|
||||||
|
UPDATE_DISABLED=yes
|
||||||
;;
|
;;
|
||||||
FILE=*)
|
FILE=*)
|
||||||
MOUNT_CMD="mount_common"
|
MOUNT_CMD="mount_common"
|
||||||
@ -456,6 +460,13 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$UPDATE_DIR/$UPDATE_KERNEL" -a -f "$UPDATE_DIR/$UPDATE_SYSTEM" ] ; then
|
if [ -f "$UPDATE_DIR/$UPDATE_KERNEL" -a -f "$UPDATE_DIR/$UPDATE_SYSTEM" ] ; then
|
||||||
|
if [ "$UPDATE_DISABLED" = "yes" ] ; then
|
||||||
|
rm -rf $UPDATE_DIR/[0-9a-zA-Z]* &>/dev/null
|
||||||
|
echo "Updating not supported on netboot. normal startup in 10s..."
|
||||||
|
sync
|
||||||
|
usleep 10000000
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
if [ -f "$UPDATE_DIR/.nocheck" ] ; then
|
if [ -f "$UPDATE_DIR/.nocheck" ] ; then
|
||||||
MD5_NOCHECK="1"
|
MD5_NOCHECK="1"
|
||||||
fi
|
fi
|
||||||
@ -568,6 +579,10 @@
|
|||||||
/bin/busybox mount --move /proc /sysroot/proc
|
/bin/busybox mount --move /proc /sysroot/proc
|
||||||
/bin/busybox mount --move /sys /sysroot/sys
|
/bin/busybox mount --move /sys /sysroot/sys
|
||||||
|
|
||||||
|
# tell OE settings addon to disable updates
|
||||||
|
if [ "$UPDATE_DISABLED" = "yes" ] ; then
|
||||||
|
echo "" > /sysroot/dev/.update_disabled
|
||||||
|
fi
|
||||||
# switch to new sysroot and start real init
|
# switch to new sysroot and start real init
|
||||||
exec /bin/busybox switch_root /sysroot /lib/systemd/systemd $INIT_ARGS
|
exec /bin/busybox switch_root /sysroot /lib/systemd/systemd $INIT_ARGS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user