mklive: do not assume glibc and/or systemd (might use musl and runit instead :-).

This commit is contained in:
Juan RP 2014-05-23 11:30:24 +02:00
parent 11e39d0fbc
commit 3b5b9cba6a
3 changed files with 18 additions and 9 deletions

View File

@ -22,12 +22,14 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then
fi fi
# Enable autologin for agetty(8). # Enable autologin for agetty(8).
rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service" if [ -d ${NEWROOT}/etc/systemd/system ]; then
sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \ rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
"${NEWROOT}/usr/lib/systemd/system/getty@.service" > \ sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \
"${NEWROOT}/etc/systemd/system/getty@.service" "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \
ln -sf /etc/systemd/system/getty@.service \ "${NEWROOT}/etc/systemd/system/getty@.service"
"${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.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 [ -d ${NEWROOT}/etc/polkit-1 ]; then
# If polkit is installed allow users in the wheel group to run anything. # If polkit is installed allow users in the wheel group to run anything.

View File

@ -14,4 +14,9 @@ echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf
# set keymap too. # set keymap too.
KEYMAP=$(getarg vconsole.keymap) KEYMAP=$(getarg vconsole.keymap)
[ -z "$KEYMAP" ] && KEYMAP="us" [ -z "$KEYMAP" ] && KEYMAP="us"
sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf
if [ -f ${NEWROOT}/etc/vconsole.conf ]; then
sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf
elif [ -f ${NEWROOT}/etc/rc.conf ]; then
sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf.conf
fi

View File

@ -113,8 +113,10 @@ install_packages() {
${XBPS_REMOVE_CMD} -r $ROOTFS $XBPS_CACHEDIR -o >>$LOGFILE 2>&1 ${XBPS_REMOVE_CMD} -r $ROOTFS $XBPS_CACHEDIR -o >>$LOGFILE 2>&1
# Enable choosen UTF-8 locale and generate it into the target rootfs. # Enable choosen UTF-8 locale and generate it into the target rootfs.
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i $ROOTFS/etc/default/libc-locales if [ -f $ROOTFS/etc/default/libc-locales ]; then
xbps-uchroot $ROOTFS xbps-reconfigure -f glibc-locales >>$LOGFILE 2>&1 sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i $ROOTFS/etc/default/libc-locales
xbps-uchroot $ROOTFS xbps-reconfigure -f glibc-locales >>$LOGFILE 2>&1
fi
if [ -x installer.sh ]; then if [ -x installer.sh ]; then
install -Dm755 installer.sh $ROOTFS/usr/sbin/void-installer install -Dm755 installer.sh $ROOTFS/usr/sbin/void-installer