init: drop INIT_UNIT logic

This is now handled by the libreelec-target-generator systemd
generator.

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2020-08-25 13:32:23 +02:00
parent d233b7660d
commit 2da7a9f351

View File

@ -1005,11 +1005,7 @@ for arg in $(cat /proc/cmdline); do
wol_wait=*)
wol_wait="${arg#*=}"
;;
textmode)
INIT_UNIT="--unit=textmode.target"
;;
installer)
INIT_UNIT="--unit=installer.target"
SYSLINUX_DEFAULT="installer"
;;
debugging)
@ -1134,19 +1130,7 @@ if [ "$STORAGE_NETBOOT" = "yes" ]; then
echo "" > /sysroot/dev/.storage_netboot
fi
BACKUP_FILE=$(ls -1 /sysroot/storage/.restore/*.tar 2>/dev/null | head -n 1)
if [ -f /sysroot/storage/.please_resize_me ]; then
INIT_UNIT="--unit=fs-resize.target"
elif [ -f /sysroot/storage/.cache/reset_oe -o -f /sysroot/storage/.cache/reset_xbmc ]; then
INIT_UNIT="--unit=factory-reset.target"
elif [ -f "$BACKUP_FILE" ]; then
INIT_UNIT="--unit=backup-restore.target"
elif [ -f /sysroot/storage/.rpi_flash_firmware ]; then
INIT_UNIT="--unit=rpi-flash-firmware.target"
fi
# switch to new sysroot and start real init
exec /usr/bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS $INIT_UNIT
exec /usr/bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS
error "switch_root" "Error in initramfs. Could not switch to new root"