forked from mirrored-repos/manjaro-tools
util-iso-*: several small fixes
This commit is contained in:
parent
da8b6a828a
commit
64639031f7
3 changed files with 20 additions and 22 deletions
|
@ -12,7 +12,7 @@
|
||||||
set_mkinicpio_hooks(){
|
set_mkinicpio_hooks(){
|
||||||
if ! ${pxe_boot};then
|
if ! ${pxe_boot};then
|
||||||
msg2 "Removing pxe hooks"
|
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
|
-e 's/memdisk //' -i $1
|
||||||
fi
|
fi
|
||||||
if ! ${plymouth_boot};then
|
if ! ${plymouth_boot};then
|
||||||
|
@ -115,16 +115,16 @@ check_syslinux_optional(){
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_syslinux(){
|
prepare_syslinux(){
|
||||||
local syslinux=/usr/lib/syslinux/bios
|
local syslinux=$1/usr/lib/syslinux/bios
|
||||||
msg2 "Copying syslinux binaries ..."
|
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 ..."
|
msg2 "Copying syslinux theme ..."
|
||||||
cp ${DATADIR}/syslinux-theme/* $1
|
cp $1${DATADIR}/syslinux-theme/* $2
|
||||||
for conf in $1/*.cfg; do
|
for conf in $2/*.cfg; do
|
||||||
vars_to_boot_conf "${conf}"
|
vars_to_boot_conf "${conf}"
|
||||||
done
|
done
|
||||||
if ! ${nonfree_mhwd};then
|
if ! ${nonfree_mhwd};then
|
||||||
check_syslinux_optional "$1"
|
check_syslinux_optional "$2"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,16 +132,16 @@ write_isomounts(){
|
||||||
local file=$1/isomounts
|
local file=$1/isomounts
|
||||||
echo '# syntax: <img> <arch> <mount point> <type> <kernel argument>' > ${file}
|
echo '# syntax: <img> <arch> <mount point> <type> <kernel argument>' > ${file}
|
||||||
echo '' >> ${file}
|
echo '' >> ${file}
|
||||||
msg2 "Writing live entry ..."
|
msg2 "Writing %s entry ..." "live-image"
|
||||||
echo "${target_arch}/live-image.sqfs ${target_arch} / squashfs" >> ${file}
|
echo "${imgarch}/live-image.sqfs ${imgarch} / squashfs" >> ${file}
|
||||||
if [[ -f ${packages_mhwd} ]] ; then
|
if [[ -f ${packages_mhwd} ]] ; then
|
||||||
msg2 "Writing mhwd entry ..."
|
msg2 "Writing %s entry ..." "mhwd-image"
|
||||||
echo "${target_arch}/mhwd-image.sqfs ${target_arch} / squashfs" >> ${file}
|
echo "${imgarch}/mhwd-image.sqfs ${imgarch} / squashfs" >> ${file}
|
||||||
fi
|
fi
|
||||||
if [[ -f "${packages_custom}" ]] ; then
|
if [[ -f "${packages_custom}" ]] ; then
|
||||||
msg2 "Writing %s entry ..." "${profile}"
|
msg2 "Writing %s entry ..." "${profile}-image"
|
||||||
echo "${target_arch}/${profile}-image.sqfs ${target_arch} / squashfs" >> ${file}
|
echo "${imgarch}/${profile}-image.sqfs ${imgarch} / squashfs" >> ${file}
|
||||||
fi
|
fi
|
||||||
msg2 "Writing root entry ..."
|
msg2 "Writing %s entry ..." "root-image"
|
||||||
echo "${target_arch}/root-image.sqfs ${target_arch} / squashfs" >> ${file}
|
echo "${imgarch}/root-image.sqfs ${imgarch} / squashfs" >> ${file}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ chroot_clean(){
|
||||||
done
|
done
|
||||||
exec 9>&-
|
exec 9>&-
|
||||||
rm -rf --one-file-system "$1"
|
rm -rf --one-file-system "$1"
|
||||||
msg2 "Deleting iso root [%s] ..." "$2"
|
msg2 "Deleting isoroot [%s] ..." "${2##*/}"
|
||||||
rm -rf --one-file-system "$2"
|
rm -rf --one-file-system "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,5 +298,5 @@ clean_up_image(){
|
||||||
find "$path" -mindepth 1 -delete &> /dev/null
|
find "$path" -mindepth 1 -delete &> /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete
|
find "$1" -name *.pacnew -name *.pacsave -name *.pacorig -delete
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,11 +148,8 @@ assemble_iso(){
|
||||||
make_iso() {
|
make_iso() {
|
||||||
msg "Start [Build ISO]"
|
msg "Start [Build ISO]"
|
||||||
touch "${iso_root}/.miso"
|
touch "${iso_root}/.miso"
|
||||||
for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do
|
for d in $(find "${work_dir}" -maxdepth 1 -type d); do
|
||||||
if [[ "$d" != "${work_dir}/iso" ]] && \
|
if [[ "$d" != "${work_dir}" ]]; then
|
||||||
[[ "${d##*/}" != "iso" ]] && \
|
|
||||||
[[ "${d##*/}" != "efiboot" ]] && \
|
|
||||||
[[ "$d" != "${work_dir}" ]]; then
|
|
||||||
make_sqfs "$d"
|
make_sqfs "$d"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -349,6 +346,7 @@ make_efi_dvd() {
|
||||||
|
|
||||||
prepare_efi_loader "${work_dir}/live-image" "${work_dir}/efiboot" "dvd"
|
prepare_efi_loader "${work_dir}/live-image" "${work_dir}/efiboot" "dvd"
|
||||||
umount -d ${work_dir}/efiboot
|
umount -d ${work_dir}/efiboot
|
||||||
|
rm -r ${work_dir}/efiboot
|
||||||
: > ${work_dir}/build.${FUNCNAME}
|
: > ${work_dir}/build.${FUNCNAME}
|
||||||
msg "Done [/efiboot/EFI]"
|
msg "Done [/efiboot/EFI]"
|
||||||
fi
|
fi
|
||||||
|
@ -359,7 +357,7 @@ make_syslinux() {
|
||||||
msg "Prepare [/iso/syslinux]"
|
msg "Prepare [/iso/syslinux]"
|
||||||
local syslinux=${iso_root}/syslinux
|
local syslinux=${iso_root}/syslinux
|
||||||
mkdir -p ${syslinux}
|
mkdir -p ${syslinux}
|
||||||
prepare_syslinux "${syslinux}"
|
prepare_syslinux "${work_dir}/live-image" "${syslinux}"
|
||||||
mkdir -p ${syslinux}/hdt
|
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}/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
|
gzip -c -9 ${work_dir}/live-image/usr/lib/modules/*-MANJARO/modules.alias > ${syslinux}/hdt/modalias.gz
|
||||||
|
|
Loading…
Reference in a new issue