util-iso-*: several small fixes

This commit is contained in:
udeved 2016-10-10 22:07:49 +02:00
parent da8b6a828a
commit 64639031f7
3 changed files with 20 additions and 22 deletions

View file

@ -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: <img> <arch> <mount point> <type> <kernel argument>' > ${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}
}

View file

@ -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
}

View file

@ -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