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/getty-autologin.sh | |
parent | b593f32c14e4fb001e69be3910197adec16341ad (diff) | |
download | hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.tar.gz hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.tar.xz hrmpf-180f3473a1e2696e072e9176906d4520a3329dd0.zip |
add console autologin
Diffstat (limited to 'dracut/getty-autologin.sh')
-rw-r--r-- | dracut/getty-autologin.sh | 11 |
1 files changed, 11 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 |