diff options
author | Juan RP <xtraeme@gmail.com> | 2014-05-23 11:30:24 +0200 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2014-05-23 11:30:24 +0200 |
commit | 3b5b9cba6a69b191faccae4d8c798b5fc84dc704 (patch) | |
tree | 4e1478ff392a4917a2f9f81a6e41a7f369579ede /dracut/adduser.sh | |
parent | 11e39d0fbc5de4c9ada783c34f9d02bee74d21d0 (diff) | |
download | hrmpf-3b5b9cba6a69b191faccae4d8c798b5fc84dc704.tar.gz hrmpf-3b5b9cba6a69b191faccae4d8c798b5fc84dc704.tar.xz hrmpf-3b5b9cba6a69b191faccae4d8c798b5fc84dc704.zip |
mklive: do not assume glibc and/or systemd (might use musl and runit instead :-).
Diffstat (limited to 'dracut/adduser.sh')
-rw-r--r-- | dracut/adduser.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dracut/adduser.sh b/dracut/adduser.sh index aaee9f3..246b20d 100644 --- a/dracut/adduser.sh +++ b/dracut/adduser.sh @@ -22,12 +22,14 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then fi # Enable autologin for agetty(8). -rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" -sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \ - "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \ - "${NEWROOT}/etc/systemd/system/getty@.service" -ln -sf /etc/systemd/system/getty@.service \ - "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" +if [ -d ${NEWROOT}/etc/systemd/system ]; then + rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" + sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \ + "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \ + "${NEWROOT}/etc/systemd/system/getty@.service" + ln -sf /etc/systemd/system/getty@.service \ + "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" +fi if [ -d ${NEWROOT}/etc/polkit-1 ]; then # If polkit is installed allow users in the wheel group to run anything. |