diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index a6b4d57b7..fe20540d5 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -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 diff --git a/usr/lib/archboot/installer/common.sh b/usr/lib/archboot/installer/common.sh index 0222c026e..2d4a58566 100644 --- a/usr/lib/archboot/installer/common.sh +++ b/usr/lib/archboot/installer/common.sh @@ -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