diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index c1dd1036d4..b8835e6f20 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -72,6 +72,11 @@ ;; boot=*) boot="${arg#*=}" + case $boot in + CIFS=*|SMB=*|ISCSI=*|NBD=*|NFS=*) + UPDATE_DISABLED=yes + ;; + esac ;; disk=*) disk="${arg#*=}" @@ -456,6 +461,13 @@ fi 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 MD5_NOCHECK="1" fi @@ -568,6 +580,10 @@ /bin/busybox mount --move /proc /sysroot/proc /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 exec /bin/busybox switch_root /sysroot /lib/systemd/systemd $INIT_ARGS