Start integration of void-installer and start conversion to non-busybox utils.
This commit is contained in:
41
mklive.sh.in
41
mklive.sh.in
@@ -1,4 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
#-
|
||||
# Copyright (c) 2009-2013 Juan Romero Pardines.
|
||||
# All rights reserved.
|
||||
@@ -41,8 +44,8 @@ error_out() {
|
||||
write_etc_motd() {
|
||||
cat >> "$ROOTFS/etc/motd" <<_EOF
|
||||
###############################################################################
|
||||
Autogenerated by void-mklive "@@MKLIVE_VERSION@@"
|
||||
-------------------------------------------------------------------------------
|
||||
Autogenerated by void-mklive "@@MKLIVE_VERSION@@"
|
||||
###############################################################################
|
||||
|
||||
Welcome to the Void Linux Live system, you have been autologged in.
|
||||
This user has full sudo(8) permissions without any password, be careful
|
||||
@@ -50,9 +53,11 @@ executing commands through sudo(8).
|
||||
|
||||
To start the installation please type:
|
||||
|
||||
$ sudo void-installer
|
||||
$ sudo void-installer
|
||||
|
||||
and follow the on-screen instructions. Thanks for trying Void Linux.
|
||||
and follow the on-screen instructions. Thanks for using Void Linux.
|
||||
|
||||
http://www.voidlinux.eu
|
||||
|
||||
###############################################################################
|
||||
_EOF
|
||||
@@ -92,8 +97,7 @@ _EOF
|
||||
chmod 644 "$1"
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
usage() {
|
||||
cat <<_EOF
|
||||
Usage: $(basename $0) [options]
|
||||
|
||||
@@ -137,6 +141,8 @@ install_packages() {
|
||||
if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then
|
||||
systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1
|
||||
fi
|
||||
|
||||
install -Dm755 /usr/sbin/void-installer $ROOTFS/usr/sbin/void-installer
|
||||
}
|
||||
|
||||
generate_initramfs() {
|
||||
@@ -145,31 +151,16 @@ generate_initramfs() {
|
||||
$XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -y \
|
||||
base-system void-mklive >>$LOGFILE 2>&1
|
||||
|
||||
# Install some required utilities from util-linux.
|
||||
install -Dm755 $ROOTFS/kernel_temp/usr/bin/mount "$ROOTFS/usr/bin/mount"
|
||||
install -Dm755 $ROOTFS/kernel_temp/usr/sbin/agetty "$ROOTFS/usr/sbin/agetty"
|
||||
install -Dm755 $ROOTFS/kernel_temp/usr/bin/lsblk "$ROOTFS/usr/bin/lsblk"
|
||||
# Install stdbuf from coreutils, required by void-installer.
|
||||
install -Dm755 $ROOTFS/kernel_temp/usr/bin/stdbuf "$ROOTFS/usr/bin/stdbuf"
|
||||
install -Dm755 $ROOTFS/kernel_temp/usr/libexec/coreutils/libstdbuf.so \
|
||||
"$ROOTFS/usr/libexec/coreutils/libstdbuf.so"
|
||||
|
||||
chroot $ROOTFS/kernel_temp /usr/bin/dracut --no-hostonly \
|
||||
--add " dmsquash-live vmklive " --${COMPRESSTYPE} \
|
||||
--add "drm dmsquash-live vmklive" --omit "caps" \
|
||||
--add-drivers "xfs vfat ext2 ext3 ext4 btrfs" --${COMPRESSTYPE} \
|
||||
"/boot/initrd.lz" $KERNELVERSION >>$LOGFILE 2>&1
|
||||
|
||||
mv $ROOTFS/kernel_temp/boot/initrd.lz $BOOT_DIR
|
||||
# We rely on pam now, so let's install the host login config.
|
||||
install -Dm644 $ROOTFS/kernel_temp/etc/pam.d/login \
|
||||
"$ROOTFS/etc/pam.d/login"
|
||||
# Remove pam_motd.so; busybox login already prints it.
|
||||
sed -e '/^.*pam_motd.so*/d' -i "$ROOTFS/etc/pam.d/login"
|
||||
}
|
||||
|
||||
copy_kernel_and_modules() {
|
||||
cp -a $ROOTFS/kernel_temp/boot/vmlinuz-$KERNELVERSION $BOOT_DIR/vmlinuz
|
||||
mkdir -p $ROOTFS/lib/modules
|
||||
cp -a $ROOTFS/kernel_temp/lib/modules/$KERNELVERSION $ROOTFS/lib/modules
|
||||
|
||||
# remove temporary rootfs.
|
||||
rm -rf $ROOTFS/kernel_temp
|
||||
@@ -341,7 +332,7 @@ fi
|
||||
if [ -z "$PACKAGE_LIST" ]; then
|
||||
PACKAGE_LIST="base-system-live"
|
||||
else
|
||||
PACKAGE_LIST="base-system-live $PACKAGE_LIST"
|
||||
PACKAGE_LIST="$PACKAGE_LIST"
|
||||
fi
|
||||
if [ ! -f $SYSLINUX_DATADIR/isolinux.bin ]; then
|
||||
echo "Missing required isolinux files in $SYSLINUX_DATADIR, exiting..."
|
||||
@@ -461,5 +452,3 @@ hsize=$(du -sh "$OUTPUT_FILE"|awk '{print $1}')
|
||||
info_msg "Created $(readlink -f $OUTPUT_FILE) ($hsize) successfully."
|
||||
|
||||
exit 0
|
||||
|
||||
# vim: set ts=4 sw=4 et:
|
||||
|
Reference in New Issue
Block a user