diff options
Diffstat (limited to 'mklive.sh.in')
-rw-r--r-- | mklive.sh.in | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/mklive.sh.in b/mklive.sh.in index ed710f9..c54b3be 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -81,6 +81,7 @@ Options: -C "cmdline args" Add additional kernel command line arguments. -T "title" Modify the bootloader title. -K Do not remove builddir. + -B <file> Add file to /boot The $PROGNAME script generates a live image of the Void Linux distribution. This ISO image can be written to a CD/DVD-ROM or any USB stick. @@ -131,6 +132,12 @@ install_packages() { fi chroot $ROOTFS env -i xbps-reconfigure -a + xbps-query -r $ROOTFS -l >installed.pkgs + xbps-alternatives -r $ROOTFS -s dash + xbps-alternatives -r $ROOTFS -s inetutils-hostname + xbps-alternatives -r $ROOTFS -s ex-vi + xbps-alternatives -r $ROOTFS -l >installed.alternatives + if [ -x installer.sh ]; then install -Dm755 installer.sh $ROOTFS/usr/sbin/void-installer else @@ -159,6 +166,9 @@ generate_initramfs() { mv $ROOTFS/boot/initrd $BOOT_DIR cp $ROOTFS/boot/vmlinuz-$KERNELVERSION $BOOT_DIR/vmlinuz + if [ "$BOOT_FILES" ]; then + cp $BOOT_FILES $BOOT_DIR + fi } cleanup_rootfs() { @@ -180,6 +190,7 @@ generate_isolinux_boot() { cp -f $SYSLINUX_DATADIR/vesamenu.c32 "$ISOLINUX_DIR" cp -f $SYSLINUX_DATADIR/libutil.c32 "$ISOLINUX_DIR" cp -f $SYSLINUX_DATADIR/chain.c32 "$ISOLINUX_DIR" + cp -f $SYSLINUX_DATADIR/memdisk "$ISOLINUX_DIR" cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR" @@ -292,10 +303,11 @@ generate_iso_image() { # # main() # -while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do +while getopts "a:B:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do case $opt in a) BASE_ARCH="$OPTARG";; b) BASE_SYSTEM_PKG="$OPTARG";; + B) BOOT_FILES="$BOOT_FILES $OPTARG";; r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";; c) XBPS_CACHEDIR="--cachedir=$OPTARG";; K) readonly KEEP_BUILDDIR=1;; @@ -379,14 +391,14 @@ _linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITOR _kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series}) KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver}) -: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} +: ${OUTPUT_FILE="hrmpf-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..." install_prereqs mkdir -p "$ROOTFS"/etc [ -s data/motd ] && cp data/motd $ROOTFS/etc -[ -s data/issue ] && cp data/issue $ROOTFS/etc +[ -s data/issue.in ] && sed "s/@@VERSION@@/hrmpf-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d)/" data/issue.in >$ROOTFS/etc/issue print_step "Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..." install_packages |