pmaports/main/postmarketos-ui-weston/postmarketos-ui-weston.post-install
2018-11-27 07:47:11 +01:00

15 lines
546 B
Bash

#!/bin/sh
# Autologin on tty1, let busybox autoconfigure 2-6
autologin="$(getent passwd 10000 | cut -d ":" -f 1)"
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
# Create weston-launch group and add user to it
[ $(getent group weston-launch) ] || groupadd weston-launch
username="$(getent passwd 10000 | cut -d ":" -f 1)"
usermod -a -G weston-launch "$username"