2017-11-26 17:08:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /etc/deviceinfo
|
|
|
|
|
|
|
|
# Autologin on tty1, let busybox autoconfigure 2-6
|
2018-08-02 20:10:56 +00:00
|
|
|
autologin="$(getent passwd 10000 | cut -d ":" -f 1)"
|
2017-11-26 17:08:10 +00:00
|
|
|
for i in 1 2 3 4 5 6; do
|
|
|
|
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
|
|
|
|
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
|
|
|
|
[ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin"
|
|
|
|
sed -i -e "s.$old.$new.g" /etc/inittab
|
|
|
|
done
|