mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
init: there can be only one default systemd unit
This commit is contained in:
@@ -108,10 +108,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
|
||||
@@ -669,13 +669,13 @@
|
||||
|
||||
BACKUP_FILE=`ls -1 /sysroot/storage/.restore/??????????????.tar 2>/dev/null | head -n 1`
|
||||
if [ -f "$BACKUP_FILE" ] ; then
|
||||
INIT_ARGS="--unit=backup-restore.target"
|
||||
INIT_UNIT="--unit=backup-restore.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"
|
||||
|
||||
Reference in New Issue
Block a user