init: there can be only one default systemd unit

This commit is contained in:
Stefan Saraev 2015-01-19 11:53:58 +02:00 committed by Stephan Raue
parent a5b35e1b44
commit d90305e027

View File

@ -103,10 +103,10 @@
wol_wait="${arg#*=}"
;;
textmode)
INIT_ARGS="$INIT_ARGS --unit=textmode.target"
INIT_UNIT="--unit=textmode.target"
;;
installer)
INIT_ARGS="$INIT_ARGS --unit=installer.target"
INIT_UNIT="--unit=installer.target"
;;
debugging)
DEBUG=yes
@ -668,13 +668,13 @@
fi
if [ -f /sysroot/storage/.please_resize_me ] ; then
INIT_ARGS="--unit=fs-resize.target"
INIT_UNIT="--unit=fs-resize.target"
fi
if [ -f /sysroot/storage/.cache/reset_oe -o -f /sysroot/storage/.cache/reset_xbmc ] ; then
INIT_ARGS="--unit=factory-reset.target"
INIT_UNIT="--unit=factory-reset.target"
fi
# switch to new sysroot and start real init
exec /bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS
exec /bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS $INIT_UNIT
error "switch_root" "Error in initramfs. Could not switch to new root"