summaryrefslogtreecommitdiff
path: root/share/customize-autologin.sh
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2023-04-27 19:42:30 +0200
committerHelmut Grohne <helmut@subdivi.de>2023-04-27 19:42:30 +0200
commitbf913f499d677e82b8c35548ebfa4f267139762a (patch)
treef9c50a6c1093c980b0b89aa1dff67674806ee587 /share/customize-autologin.sh
parentb43062f23f2dcd2cfc7c2d3c59aa2c920e8e1576 (diff)
downloaddebvm-bf913f499d677e82b8c35548ebfa4f267139762a.tar.gz
debvm-create: recognize finit as an init system
Diffstat (limited to 'share/customize-autologin.sh')
-rwxr-xr-xshare/customize-autologin.sh8
1 files changed, 8 insertions, 0 deletions
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