mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
more functions fixing
This commit is contained in:
parent
3d491ec3bc
commit
bbd7756966
2 changed files with 17 additions and 2 deletions
|
@ -26,6 +26,21 @@ printk()
|
|||
esac
|
||||
}
|
||||
|
||||
# geteditor()
|
||||
# prompts the user to choose an editor
|
||||
# sets EDITOR global variable
|
||||
geteditor() {
|
||||
if ! [[ "${EDITOR}" ]]; then
|
||||
DIALOG --menu "Select a Text Editor to Use" 10 35 3 \
|
||||
"1" "nano (easier)" \
|
||||
"2" "vi" 2>${ANSWER} || return 1
|
||||
case $(cat ${ANSWER}) in
|
||||
"1") EDITOR="nano" ;;
|
||||
"2") EDITOR="vi" ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
getdest() {
|
||||
[[ "${DESTDIR}" ]] && return 0
|
||||
DIALOG --inputbox "Enter the destination directory where your target system is mounted" 8 65 "${DESTDIR}" 2>${ANSWER} || return 1
|
||||
|
|
|
@ -11,12 +11,13 @@ if [[ "${RUNNING_ARCH}" == "aarch64" ]]; then
|
|||
VMLINUZ="Image.gz"
|
||||
VMLINUZ_EFISTUB="Image"
|
||||
fi
|
||||
# name of the initramfs filesystem
|
||||
INITRAMFS="initramfs-${KERNELPKG}"
|
||||
# abstract the common pacman args
|
||||
PACMAN="pacman --root ${DESTDIR} ${PACMAN_CONF} --cachedir=${DESTDIR}/var/cache/pacman/pkg --noconfirm --noprogressbar"
|
||||
|
||||
# chroot_mount()
|
||||
# prepares target system as a chroot
|
||||
#
|
||||
chroot_mount()
|
||||
{
|
||||
if grep -qw archboot /etc/hostname; then
|
||||
|
@ -33,7 +34,6 @@ chroot_mount()
|
|||
|
||||
# chroot_umount()
|
||||
# tears down chroot in target system
|
||||
#
|
||||
chroot_umount()
|
||||
{
|
||||
if grep -qw archboot /etc/hostname; then
|
||||
|
|
Loading…
Reference in a new issue