Compare commits

...

3 Commits

Author SHA1 Message Date
911a0fff36 buildiso: fix grub theme paths 2019-12-15 23:30:31 +01:00
f80c51e8d3 buildiso: fix umount on error 2019-12-15 23:00:17 +01:00
1e948b3ef5 buildiso: fix cal unpackfs path 2019-12-14 23:14:47 +01:00
3 changed files with 12 additions and 8 deletions

View File

@@ -143,10 +143,10 @@ write_unpackfs() {
local yaml=$(write_yaml_header) local yaml=$(write_yaml_header)
yaml+=$(write_yaml_map 0 'unpack') yaml+=$(write_yaml_map 0 'unpack')
# if ${persist}; then # if ${persist}; then
# yaml+=$(write_yaml_seq_map 2 'source' '"/run/bootmnt/LiveOS/rootfs.img"') # yaml+=$(write_yaml_seq_map 2 'source' '"/run/artix/bootmnt/LiveOS/rootfs.img"')
# yaml+=$(write_yaml_map 4 'sourcefs' '"ext4"') # yaml+=$(write_yaml_map 4 'sourcefs' '"ext4"')
# else # else
yaml+=$(write_yaml_seq_map 2 'source' '"/run/bootmnt/LiveOS/rootfs.img"') yaml+=$(write_yaml_seq_map 2 'source' '"/run/artix/bootmnt/LiveOS/rootfs.img"')
yaml+=$(write_yaml_map 4 'sourcefs' '"squashfs"') yaml+=$(write_yaml_map 4 'sourcefs' '"squashfs"')
# fi # fi
yaml+=$(write_yaml_map 4 'destination' '""') yaml+=$(write_yaml_map 4 'destination' '""')

View File

@@ -130,12 +130,15 @@ configure_grub(){
prepare_grub(){ prepare_grub(){
local platform=i386-pc img='core.img' prefix=/boot/grub local platform=i386-pc img='core.img' prefix=/boot/grub
local lib=$1/usr/lib/grub theme=$2/usr/share/grub local lib="$1"/usr/lib/grub
local theme="$1"/usr/share/grub
local livecfg="$2"/usr/share/grub
local grub=${iso_root}/boot/grub efi=${iso_root}/efi/boot local grub=${iso_root}/boot/grub efi=${iso_root}/efi/boot
prepare_dir ${grub}/${platform} prepare_dir ${grub}/${platform}
cp ${theme}/cfg/*.cfg ${grub} cp ${livecfg}/cfg/*.cfg ${grub}
cp ${lib}/${platform}/* ${grub}/${platform} cp ${lib}/${platform}/* ${grub}/${platform}
@@ -158,8 +161,9 @@ prepare_grub(){
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660 grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
prepare_dir ${grub}/themes prepare_dir ${grub}/themes
cp -r ${theme}/themes/artix ${grub}/themes/
cp -r ${theme}/{locales,tz} ${grub} cp -r ${theme}/themes/artix ${grub}/themes
cp -r ${livecfg}/{locales,tz} ${grub}
if [[ -f /usr/share/grub/unicode.pf2 ]];then if [[ -f /usr/share/grub/unicode.pf2 ]];then
msg2 "Copying %s ..." "unicode.pf2" msg2 "Copying %s ..." "unicode.pf2"

View File

@@ -19,7 +19,7 @@ error_function() {
error "A failure occurred in %s()." "$func" error "A failure occurred in %s()." "$func"
plain "Aborting..." plain "Aborting..."
fi fi
umount_overlay umount_overlayfs
umount_img umount_img
exit 2 exit 2
} }
@@ -41,7 +41,7 @@ run_safe() {
trap_exit() { trap_exit() {
local sig=$1; shift local sig=$1; shift
error "$@" error "$@"
umount_overlay umount_overlayfs
trap -- "$sig" trap -- "$sig"
kill "-$sig" "$$" kill "-$sig" "$$"
} }