From dbac38c0f7d230efc6b8200b3f07ade1bee7e8cb Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Mon, 7 Aug 2017 18:26:25 -0700 Subject: [PATCH] Revert "mklive.sh.in: add custom scripts to init" This reverts commit 3c68cc41588aa82fc30680e881f6b5f8c610be35. This commit was not adequately reviewed and introduces unintentional errors to the mklive system as well as unfavorable directory contents in every published ISO. --- mklive.sh.in | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/mklive.sh.in b/mklive.sh.in index 19e63d3..cf2aff0 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -78,8 +78,7 @@ Options: -o Output file name for the ISO image (auto if unset). -p "pkg pkgN ..." Install additional packages into the ISO image. -I Include directory structure under given path into rootfs - -H Add scripts in given directory as startup hooks to the init - procedure. + -C "cmdline args" Add additional kernel command line arguments. -T "title" Modify the bootloader title. -K Do not remove builddir. @@ -182,13 +181,6 @@ cleanup_rootfs() { rm -r $ROOTFS/usr/lib/dracut/modules.d/01autoinstaller } -setup_init_hooks() { - hooks_dir=/usr/local/custom-scripts/ - mkdir -p ${ROOTFS}${hooks_dir} - find $HOOKS_DIRECTORY -mindepth 1 -maxdepth 1 -exec cp -rfpPv {} ${ROOTFS}${hooks_dir} \; - echo 'find '${hooks_dir}' -type f -executable -exec {} \;' >> $ROOTFS/etc/rc.local -} - generate_isolinux_boot() { cp -f $SYSLINUX_DATADIR/isolinux.bin "$ISOLINUX_DIR" cp -f $SYSLINUX_DATADIR/ldlinux.c32 "$ISOLINUX_DIR" @@ -304,7 +296,7 @@ generate_iso_image() { # # main() # -while getopts "a:b:r:c:C:T:Kk:l:i:I:H:s:S:o:p:h" opt; do +while getopts "a: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";; @@ -314,8 +306,7 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:H:s:S:o:p:h" opt; do k) KEYMAP="$OPTARG";; l) LOCALE="$OPTARG";; i) INITRAMFS_COMPRESSION="$OPTARG";; - I) INCLUDE_DIRECTORY=$(cd "$OPTARG" && pwd);; - H) HOOKS_DIRECTORY=$(cd "$OPTARG" && pwd);; + I) INCLUDE_DIRECTORY="$OPTARG";; s) SQUASHFS_COMPRESSION="$OPTARG";; S) ROOTFS_FREESIZE="$OPTARG";; o) OUTPUT_FILE="$OPTARG";; @@ -368,8 +359,7 @@ GRUB_DIR="$BOOT_DIR/grub" ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg" CURRENT_STEP=0 STEP_COUNT=9 -[ -n "${INCLUDE_DIRECTORY}" ] && STEP_COUNT=$((STEP_COUNT+1)) -[ -n "${HOOKS_DIRECTORY}" ] && STEP_COUNT=$((STEP_COUNT+1)) +[ -n "${INCLUDE_DIRECTORY}" ] && ((STEP_COUNT=STEP_COUNT+1)) : ${SYSLINUX_DATADIR:=$VOIDHOSTDIR/usr/share/syslinux} : ${GRUB_DATADIR:=$VOIDHOSTDIR/usr/share/grub} @@ -422,9 +412,6 @@ generate_grub_efi_boot print_step "Cleaning up rootfs..." cleanup_rootfs -print_step "Creating startup hooks..." -setup_init_hooks - print_step "Generating squashfs image ($SQUASHFS_COMPRESSION) from rootfs..." generate_squashfs