diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-09 15:24:32 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-09 15:43:55 +0200 |
commit | 44722b79e2f31c0c51bd2fc8c8d43c0009d79529 (patch) | |
tree | 5fc9fce8937199de06e2c22ad781e59fa654dfd2 /dracut/adduser.sh | |
parent | a25ced5c198fff963ba7b7e9b613059e756374c0 (diff) | |
parent | cb2510b3791091fb54681cee451eb7ec24e0b266 (diff) | |
download | hrmpf-44722b79e2f31c0c51bd2fc8c8d43c0009d79529.tar.gz hrmpf-44722b79e2f31c0c51bd2fc8c8d43c0009d79529.tar.xz hrmpf-44722b79e2f31c0c51bd2fc8c8d43c0009d79529.zip |
Merge remote-tracking branch 'origin/master'
* origin/master: (136 commits) dracut/services: don't autostart dmeventd, lvmetad and mdadm. mklive: fix guessing linux kernel pkgname. fix set_keymap rc.conf installer.sh: fix static IP settings in menu_install build-arm-images: PLATFORM can be overrided now. build-rootfs: build musl rootfs too; PLATFORMS can be overrided now. build-x86-images: added lxqt image. dracut/dm-autologin: autostart lxqt if available. mkrootfs: add dockstar support mklive: install GRUB EFI loader as EFI/BOOT/BOOTX64.EFI. build-x86-images: add gnome-keyring to cinnamon/mate/xfce images. build-x86-images: add firefox now it's available for musl. build-arm-images: respect musl targets. mkimage: consistently redirect std{err,out} to /dev/null with dd(1). build-arm-images: disable cubietruck for now; does not boot. build-arm-images: build all ARM images for glibc and musl. mkrootfs: get rid of pixz; fix rpi target arch. mkrootfs: set cachedir to $PWD/xbps-cachedir-<arch>; misc tweaks for musl. mkrootfs: update for musl support. build-x86-images: do not build the kde image; does not work yet. ...
Diffstat (limited to 'dracut/adduser.sh')
-rw-r--r-- | dracut/adduser.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dracut/adduser.sh b/dracut/adduser.sh index 0379690..f06a4ea 100644 --- a/dracut/adduser.sh +++ b/dracut/adduser.sh @@ -6,8 +6,10 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh echo hrmpf > ${NEWROOT}/etc/hostname +AUTOLOGIN=$(getarg live.autologin) USERNAME=$(getarg live.user) USERSHELL=$(getarg live.shell) + [ -z "$USERNAME" ] && USERNAME=anon [ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash [ -z "$USERSHELL" ] && USERSHELL=/bin/sh @@ -21,7 +23,7 @@ if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then fi # Create new user and remove password. We'll use autologin by default. -chroot ${NEWROOT} useradd -m -c $USERNAME -G wheel -s $USERSHELL $USERNAME +chroot ${NEWROOT} useradd -m -c $USERNAME -G audio,video,wheel -s $USERSHELL $USERNAME chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1 # Setup default root/user password (voidlinux). @@ -49,4 +51,8 @@ _EOF chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/void-live.rules fi +if [ -n "$AUTOLOGIN" ]; then + sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/run +fi + chroot ${NEWROOT} usermod -s /bin/bash root |