2017-07-24 20:55:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /etc/deviceinfo
|
|
|
|
|
2017-08-18 15:55:30 +00:00
|
|
|
# Autologin on tty1, let busybox autoconfigure 2-6
|
2017-10-12 20:08:10 +00:00
|
|
|
autologin="$(getent passwd 1000 | cut -d ":" -f 1)"
|
2017-08-18 15:55:30 +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
|
|
|
|
|
2017-10-07 16:14:49 +00:00
|
|
|
# Create weston-launch group and add user to it
|
|
|
|
[ $(getent group weston-launch) ] || groupadd weston-launch
|
2017-10-12 20:08:10 +00:00
|
|
|
username="$(getent passwd 1000 | cut -d ":" -f 1)"
|
|
|
|
usermod -a -G weston-launch "$username"
|