From 64639031f72d6a2f8d7c573283029e75824c5345 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 10 Oct 2016 22:07:49 +0200 Subject: [PATCH] util-iso-*: several small fixes --- lib/util-iso-boot.sh | 28 ++++++++++++++-------------- lib/util-iso-image.sh | 4 ++-- lib/util-iso.sh | 10 ++++------ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 83b3df0..e3b0990 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -12,7 +12,7 @@ set_mkinicpio_hooks(){ if ! ${pxe_boot};then msg2 "Removing pxe hooks" - sed -e 's/miso_pxe_common miso_pxe_http //' \ + sed -e 's/miso_pxe_common miso_pxe_http miso_pxe_nbd miso_pxe_nfs //' \ -e 's/memdisk //' -i $1 fi if ! ${plymouth_boot};then @@ -115,16 +115,16 @@ check_syslinux_optional(){ } prepare_syslinux(){ - local syslinux=/usr/lib/syslinux/bios + local syslinux=$1/usr/lib/syslinux/bios msg2 "Copying syslinux binaries ..." - cp ${syslinux}/{*.c32,lpxelinux.0,memdisk,{isolinux,isohdpfx}.bin} $1 + cp ${syslinux}/{*.c32,lpxelinux.0,memdisk,{isolinux,isohdpfx}.bin} $2 msg2 "Copying syslinux theme ..." - cp ${DATADIR}/syslinux-theme/* $1 - for conf in $1/*.cfg; do + cp $1${DATADIR}/syslinux-theme/* $2 + for conf in $2/*.cfg; do vars_to_boot_conf "${conf}" done if ! ${nonfree_mhwd};then - check_syslinux_optional "$1" + check_syslinux_optional "$2" fi } @@ -132,16 +132,16 @@ write_isomounts(){ local file=$1/isomounts echo '# syntax: ' > ${file} echo '' >> ${file} - msg2 "Writing live entry ..." - echo "${target_arch}/live-image.sqfs ${target_arch} / squashfs" >> ${file} + msg2 "Writing %s entry ..." "live-image" + echo "${imgarch}/live-image.sqfs ${imgarch} / squashfs" >> ${file} if [[ -f ${packages_mhwd} ]] ; then - msg2 "Writing mhwd entry ..." - echo "${target_arch}/mhwd-image.sqfs ${target_arch} / squashfs" >> ${file} + msg2 "Writing %s entry ..." "mhwd-image" + echo "${imgarch}/mhwd-image.sqfs ${imgarch} / squashfs" >> ${file} fi if [[ -f "${packages_custom}" ]] ; then - msg2 "Writing %s entry ..." "${profile}" - echo "${target_arch}/${profile}-image.sqfs ${target_arch} / squashfs" >> ${file} + msg2 "Writing %s entry ..." "${profile}-image" + echo "${imgarch}/${profile}-image.sqfs ${imgarch} / squashfs" >> ${file} fi - msg2 "Writing root entry ..." - echo "${target_arch}/root-image.sqfs ${target_arch} / squashfs" >> ${file} + msg2 "Writing %s entry ..." "root-image" + echo "${imgarch}/root-image.sqfs ${imgarch} / squashfs" >> ${file} } diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index ff655c5..6c5b18b 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -253,7 +253,7 @@ chroot_clean(){ done exec 9>&- rm -rf --one-file-system "$1" - msg2 "Deleting iso root [%s] ..." "$2" + msg2 "Deleting isoroot [%s] ..." "${2##*/}" rm -rf --one-file-system "$2" } @@ -298,5 +298,5 @@ clean_up_image(){ find "$path" -mindepth 1 -delete &> /dev/null fi fi -# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete + find "$1" -name *.pacnew -name *.pacsave -name *.pacorig -delete } diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 9712453..1570132 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -148,11 +148,8 @@ assemble_iso(){ make_iso() { msg "Start [Build ISO]" touch "${iso_root}/.miso" - for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do - if [[ "$d" != "${work_dir}/iso" ]] && \ - [[ "${d##*/}" != "iso" ]] && \ - [[ "${d##*/}" != "efiboot" ]] && \ - [[ "$d" != "${work_dir}" ]]; then + for d in $(find "${work_dir}" -maxdepth 1 -type d); do + if [[ "$d" != "${work_dir}" ]]; then make_sqfs "$d" fi done @@ -349,6 +346,7 @@ make_efi_dvd() { prepare_efi_loader "${work_dir}/live-image" "${work_dir}/efiboot" "dvd" umount -d ${work_dir}/efiboot + rm -r ${work_dir}/efiboot : > ${work_dir}/build.${FUNCNAME} msg "Done [/efiboot/EFI]" fi @@ -359,7 +357,7 @@ make_syslinux() { msg "Prepare [/iso/syslinux]" local syslinux=${iso_root}/syslinux mkdir -p ${syslinux} - prepare_syslinux "${syslinux}" + prepare_syslinux "${work_dir}/live-image" "${syslinux}" mkdir -p ${syslinux}/hdt gzip -c -9 ${work_dir}/root-image/usr/share/hwdata/pci.ids > ${syslinux}/hdt/pciids.gz gzip -c -9 ${work_dir}/live-image/usr/lib/modules/*-MANJARO/modules.alias > ${syslinux}/hdt/modalias.gz