diff options
Diffstat (limited to 'dracut')
-rw-r--r-- | dracut/adduser.sh | 17 | ||||
-rw-r--r-- | dracut/module-setup.sh | 1 |
2 files changed, 9 insertions, 9 deletions
diff --git a/dracut/adduser.sh b/dracut/adduser.sh index 808ad1a..aa26d20 100644 --- a/dracut/adduser.sh +++ b/dracut/adduser.sh @@ -12,18 +12,17 @@ echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf chmod 644 ${NEWROOT}/etc/default/live.conf # Create new user and remove password. We'll use autologin by default. -chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G systemd-journal,wheel -s /bin/bash -chroot ${NEWROOT} passwd -d $USERNAME 2>&1 >/dev/null +chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G \ + systemd-journal,wheel -s /bin/bash +chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1 # Enable sudo permission by default. if [ -f ${NEWROOT}/etc/sudoers ]; then - echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers + echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers fi # Enable autologin for agetty(8). -if [ -f ${NEWROOT}/usr/lib/systemd/system/getty@.service ]; 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.target.wants/getty@tty1.service" -fi +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.target.wants/getty@tty1.service" diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index f2cfb05..3ec42a9 100644 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -11,6 +11,7 @@ depends() { } install() { + inst /usr/bin/chroot inst /usr/bin/chmod inst /usr/bin/sed inst /usr/sbin/depmod |