Update for new dracut (rd.liveimg) and /usr switch.

This commit is contained in:
Juan RP 2012-08-29 16:55:00 +02:00
parent 0afde3876f
commit 5f3833b18f
2 changed files with 16 additions and 16 deletions

View File

@ -19,32 +19,32 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then
fi fi
# Enable autologin for getty(1). # Enable autologin for getty(1).
if [ -f ${NEWROOT}/lib/systemd/system/getty@.service ]; then if [ -f ${NEWROOT}/usr/lib/systemd/system/getty@.service ]; then
rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
sed -e "s|/sbin/agetty --noclear|/sbin/live-getty|g" \ sed -e "s|/sbin/agetty --noclear|/usr/sbin/live-getty|g" \
"${NEWROOT}/lib/systemd/system/getty@.service" > \ "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \
"${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
fi fi
# Create /sbin/live-getty. # Create /usr/sbin/live-getty.
cat > ${NEWROOT}/sbin/live-getty <<_EOF cat > ${NEWROOT}/usr&sbin/live-getty <<_EOF
#!/bin/sh #!/bin/sh
if [ -x /sbin/agetty ]; then if [ -x /usr/sbin/agetty ]; then
_getty=/sbin/agetty _getty=/usr&sbin/agetty
elif [ -x /sbin/getty ]; then elif [ -x /usr/sbin/getty ]; then
_getty=/sbin/getty _getty=/usr/sbin/getty
fi fi
exec \${_getty} -n -l /sbin/live-autologin \$* exec \${_getty} -n -l /usr/sbin/live-autologin \$*
_EOF _EOF
chmod 755 ${NEWROOT}/sbin/live-getty chmod 755 ${NEWROOT}/usr/sbin/live-getty
# Create /sbin/live-autologin. # Create /usr/sbin/live-autologin.
cat > ${NEWROOT}/sbin/live-autologin <<_EOF cat > ${NEWROOT}/usr/sbin/live-autologin <<_EOF
#!/bin/sh #!/bin/sh
. /etc/default/live.conf . /etc/default/live.conf
exec /bin/login -f \$USERNAME exec /usr/bin/login -f \$USERNAME
_EOF _EOF
chmod 755 ${NEWROOT}/sbin/live-autologin chmod 755 ${NEWROOT}/usr/sbin/live-autologin

View File

@ -23,7 +23,7 @@ MENU COLOR sel * #ffffffff #FF5255FF *
LABEL linux LABEL linux
MENU LABEL Boot Void GNU/Linux @@KERNVER@@ @@ARCH@@ MENU LABEL Boot Void GNU/Linux @@KERNVER@@ @@ARCH@@
KERNEL /boot/vmlinuz KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.lz root=live:CDLABEL=VOID_LIVE rootfstype=auto ro liveimg rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.keymap=@@KEYMAP@@ vconsole.unicode=1 locale.LANG=@@LOCALE@@ APPEND initrd=/boot/initrd.lz root=live:CDLABEL=VOID_LIVE rootfstype=auto ro rd.liveimg rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.keymap=@@KEYMAP@@ vconsole.unicode=1 locale.LANG=@@LOCALE@@
LABEL c LABEL c
MENU LABEL Boot first HD found by BIOS MENU LABEL Boot first HD found by BIOS
LOCALBOOT 0x80 LOCALBOOT 0x80