From bf913f499d677e82b8c35548ebfa4f267139762a Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 27 Apr 2023 19:42:30 +0200 Subject: debvm-create: recognize finit as an init system --- share/customize-autologin.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share') diff --git a/share/customize-autologin.sh b/share/customize-autologin.sh index da40342..7b7a130 100755 --- a/share/customize-autologin.sh +++ b/share/customize-autologin.sh @@ -64,5 +64,13 @@ if test "$(dpkg-query --root "$TARGET" -f '${db:Status-Status}' -W runit-init 2> exit 0 fi +if test "$(dpkg-query --root "$TARGET" -f '${db:Status-Status}' -W finit-sysv 2>/dev/null)" = installed; then + echo "tty [12345] @console noclear nowait nologin" >> "$TARGET/etc/finit.d/getty.conf" + # delete tty1, which could be /dev/console + sed -i -e '/\/dev\/tty1 /d' "$TARGET/etc/finit.d/getty.conf" + + exit 0 +fi + echo "failed: init system not recognized by autologin customization" 1>&2 exit 1 -- cgit v1.2.3