mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
simplify code
This commit is contained in:
parent
27b4369120
commit
02a266d10f
2 changed files with 7 additions and 5 deletions
|
@ -18,8 +18,8 @@ _limine_config() {
|
|||
PROTOCOL=linux
|
||||
KERNEL_PATH=boot://${_PARTN}/${_VMLINUZ}
|
||||
CMDLINE=${_KERNEL_PARAMS_MOD}
|
||||
MODULE_PATH=boot://${_PARTN}/${_INITRAMFS}
|
||||
CONFEOF
|
||||
echo "MODULE_PATH=boot://${_PARTN}/${_INITRAMFS}" >> "${_LIMINE_CONFIG}"
|
||||
## Edit limine.cfg config file
|
||||
_dialog --msgbox "You will now be put into the editor to edit:\nlimine.cfg\n\nAfter you save your changes, exit the editor." 8 50
|
||||
_geteditor || return 1
|
||||
|
|
|
@ -5,13 +5,15 @@ _systemd_boot_uefi() {
|
|||
_dialog --no-mouse --infobox "Setting up SYSTEMD-BOOT now..." 3 40
|
||||
# create directory structure, if it doesn't exist
|
||||
[[ -d "${_DESTDIR}/boot/loader/entries" ]] || mkdir -p "${_DESTDIR}/boot/loader/entries"
|
||||
cat << BOOTDEOF >> "${_DESTDIR}/boot/loader/entries/archlinux-core-main.conf"
|
||||
_MAIN_CFG="boot/loader/entries/archlinux-core-main.conf"
|
||||
_LOADER_CFG="boot/loader/loader.conf"
|
||||
cat << BOOTDEOF >> "${_DESTDIR}/${_MAIN_CFG}"
|
||||
title Arch Linux
|
||||
linux /${_VMLINUZ}
|
||||
initrd /${_INITRAMFS}
|
||||
options ${_KERNEL_PARAMS_MOD}
|
||||
BOOTDEOF
|
||||
cat << BOOTDEOF > "${_DESTDIR}/boot/loader/loader.conf"
|
||||
cat << BOOTDEOF > "${_DESTDIR}/${_LOADER_CFG}"
|
||||
timeout 5
|
||||
default archlinux-core-main
|
||||
BOOTDEOF
|
||||
|
@ -37,8 +39,8 @@ BOOTDEOF
|
|||
sleep 2
|
||||
_dialog --msgbox "You will now be put into the editor to edit:\nloader.conf and menu entry files\n\nAfter you save your changes, exit the editor." 8 50
|
||||
_geteditor || return 1
|
||||
"${_EDITOR}" "${_DESTDIR}/boot/loader/entries/archlinux-core-main.conf"
|
||||
"${_EDITOR}" "${_DESTDIR}/boot/loader/loader.conf"
|
||||
"${_EDITOR}" "${_DESTDIR}/${_MAIN_CFG}"
|
||||
"${_EDITOR}" "${_DESTDIR}/${_LOADER_CFG}"
|
||||
_pacman_hook_systemd_bootd
|
||||
_dialog --title " Success " --no-mouse --infobox "SYSTEMD-BOOT has been setup successfully." 3 50
|
||||
sleep 3
|
||||
|
|
Loading…
Reference in a new issue