Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
911a0fff36 | |||
f80c51e8d3 | |||
1e948b3ef5 |
@@ -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' '""')
|
||||||
|
@@ -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"
|
||||||
|
@@ -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" "$$"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user