114fdc0a68
* Allow to specify a custom username in "pmbootstrap init" * Build chroots have "pmos" instead of "user" as username now * Installation user UID is 1000 now (as in all other Linux distributions) * Adjust autologins * postmarketos-base: enable wheel group for sudo, removed previous sudoers file * Implement safe upgrade path: We save the version of the work folder format now, in $WORK/version. When this file does not exist, it defaults to 0. In case it does not match the currently required version (pmb.config.work_version), then ask the user if it should automatically be upgraded.
13 lines
364 B
Bash
13 lines
364 B
Bash
#!/bin/sh
|
|
|
|
. /etc/deviceinfo
|
|
|
|
# Autologin on tty1, let busybox autoconfigure 2-6
|
|
autologin="$(getent passwd 1000 | 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
|
|
|