mklive: more fixes for musl images.

- Reconfigure util-linux only if it's installed in rootdir.
- dracut: force add the ahci kernel module and build a non hostonly image.
This commit is contained in:
Juan RP 2014-12-29 11:26:55 +01:00
parent 653f1d2ad9
commit 8134257155

View File

@ -104,8 +104,10 @@ install_packages() {
if [ -f $ROOTFS/etc/default/libc-locales ]; then if [ -f $ROOTFS/etc/default/libc-locales ]; then
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i $ROOTFS/etc/default/libc-locales sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i $ROOTFS/etc/default/libc-locales
xbps-reconfigure -r $ROOTFS -f glibc-locales || die "Failed to reconfigure glibc-locales" xbps-reconfigure -r $ROOTFS -f glibc-locales || die "Failed to reconfigure glibc-locales"
fi
if xbps-query -r $ROOTFS util-linux >/dev/null 2>&1; then
# reconfigure util-linux just to be safe # reconfigure util-linux just to be safe
xbps-reconfigure -r $ROOTFS -f util-linux || die "Failed to reconfigure util-linux" xbps-reconfigure -r $ROOTFS -f util-linux
fi fi
if [ -x installer.sh ]; then if [ -x installer.sh ]; then
@ -126,8 +128,8 @@ generate_initramfs() {
else else
_args="--omit systemd" _args="--omit systemd"
fi fi
xbps-uchroot $ROOTFS env -i /usr/bin/dracut --${INITRAMFS_COMPRESSION} \ xbps-uchroot $ROOTFS env -i /usr/bin/dracut -N --${INITRAMFS_COMPRESSION} \
--force-add "vmklive" ${_args} "/boot/initrd" $KERNELVERSION --add-drivers "ahci" --force-add "vmklive" ${_args} "/boot/initrd" $KERNELVERSION
[ $? -ne 0 ] && die "Failed to generate the initramfs" [ $? -ne 0 ] && die "Failed to generate the initramfs"
mv $ROOTFS/boot/initrd $BOOT_DIR mv $ROOTFS/boot/initrd $BOOT_DIR