init: there can be only one default systemd unit

This commit is contained in:
Stefan Saraev 2015-01-19 11:53:58 +02:00
parent b793ba8c80
commit 208d45db46

View File

@ -108,10 +108,10 @@
wol_wait="${arg#*=}" wol_wait="${arg#*=}"
;; ;;
textmode) textmode)
INIT_ARGS="$INIT_ARGS --unit=textmode.target" INIT_UNIT="--unit=textmode.target"
;; ;;
installer) installer)
INIT_ARGS="$INIT_ARGS --unit=installer.target" INIT_UNIT="--unit=installer.target"
;; ;;
debugging) debugging)
DEBUG=yes DEBUG=yes
@ -669,13 +669,13 @@
BACKUP_FILE=`ls -1 /sysroot/storage/.restore/??????????????.tar 2>/dev/null | head -n 1` BACKUP_FILE=`ls -1 /sysroot/storage/.restore/??????????????.tar 2>/dev/null | head -n 1`
if [ -f "$BACKUP_FILE" ] ; then if [ -f "$BACKUP_FILE" ] ; then
INIT_ARGS="--unit=backup-restore.target" INIT_UNIT="--unit=backup-restore.target"
fi fi
if [ -f /sysroot/storage/.cache/reset_oe -o -f /sysroot/storage/.cache/reset_xbmc ] ; then 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 fi
# switch to new sysroot and start real init # 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" error "switch_root" "Error in initramfs. Could not switch to new root"