diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2014-11-04 18:57:28 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2014-11-04 18:57:28 +0100 |
commit | 180f3473a1e2696e072e9176906d4520a3329dd0 (patch) | |
tree | 8bcb6939d6c14a64004e44bc33a31ec3c75e285a /dracut | |
parent | b593f32c14e4fb001e69be3910197adec16341ad (diff) | |
download | hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.tar.gz hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.tar.xz hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.zip |
add console autologin
Diffstat (limited to 'dracut')
-rw-r--r-- | dracut/getty-autologin.sh | 11 | ||||
-rw-r--r-- | dracut/module-setup.sh | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/dracut/getty-autologin.sh b/dracut/getty-autologin.sh new file mode 100644 index 0000000..8313566 --- /dev/null +++ b/dracut/getty-autologin.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +USERNAME=$(getarg live.user) +[ -z "$USERNAME" ] && USERNAME=anon + +printf '%s\n' '#!/bin/sh' "exec setsid agetty --noclear --autologin root /dev/tty1 38400 linux" >${NEWROOT}/etc/sv/agetty-tty1/run +printf '%s\n' '#!/bin/sh' "exec setsid agetty --autologin root --login-pause /dev/\${PWD##*-} 38400 linux" >${NEWROOT}/etc/sv/agetty-generic/run diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index a44efd2..fb4a067 100644 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -16,6 +16,7 @@ install() { inst /usr/bin/sed inst_hook pre-pivot 01 "$moddir/adduser.sh" inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" + inst_hook pre-pivot 02 "$moddir/getty-autologin.sh" inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh" inst_hook pre-pivot 04 "$moddir/locale.sh" } |