From a761baf506e151f87dd9f1f538c658c5a483f1ba Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 22 Mar 2022 08:26:51 +0100 Subject: [PATCH] move more to basic function --- usr/bin/archboot-setup.sh | 26 +++----------------------- usr/lib/archboot/installer/base.sh | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/usr/bin/archboot-setup.sh b/usr/bin/archboot-setup.sh index 6d983d586..2b5a7ab29 100755 --- a/usr/bin/archboot-setup.sh +++ b/usr/bin/archboot-setup.sh @@ -1,29 +1,9 @@ #!/bin/bash -ANSWER="/tmp/.setup" -# use the first VT not dedicated to a running console -# don't use DESTDIR=/mnt because it's intended to mount other things there! -# check first if bootet in archboot -if grep -qw archboot /etc/hostname; then - DESTDIR="/install" - LOG="/dev/tty7" -else - DESTDIR="/" - LOG="/dev/tty8" -fi -# install stages -S_SRC=0 # choose mirror -S_NET=0 # network configuration -S_MKFS=0 # formatting -S_MKFSAUTO=0 # auto fs part/formatting -S_CONFIG=0 # configuration editing -# menu item tracker- autoselect the next item -NEXTITEM="" -# To allow choice in script set EDITOR="" -EDITOR="" - +# source base first, contains basic parameters +. /usr/lib/archboot/installer/base.sh +# source all other functions . /usr/lib/archboot/installer/autoconfiguration.sh . /usr/lib/archboot/installer/autoprepare.sh -. /usr/lib/archboot/installer/base.sh . /usr/lib/archboot/installer/blockdevices.sh . /usr/lib/archboot/installer/bootloader.sh . /usr/lib/archboot/installer/btrfs.sh diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index fe20540d5..e473672e0 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -1,5 +1,27 @@ #!/bin/bash # created by Tobias Powalowski +ANSWER="/tmp/.setup" +# use the first VT not dedicated to a running console +# don't use DESTDIR=/mnt because it's intended to mount other things there! +# check first if bootet in archboot +if grep -qw archboot /etc/hostname; then + DESTDIR="/install" + LOG="/dev/tty7" +else + DESTDIR="/" + LOG="/dev/tty8" +fi +# install stages +S_SRC=0 # choose mirror +S_NET=0 # network configuration +S_MKFS=0 # formatting +S_MKFSAUTO=0 # auto fs part/formatting +S_CONFIG=0 # configuration editing +# menu item tracker- autoselect the next item +NEXTITEM="" +# To allow choice in script set EDITOR="" +EDITOR="" + set_title() { if [[ -e "${LOCAL_DB}" ]]; then TITLE="Arch Linux Installation (Local mode) --> wiki.archlinux.org/title/Archboot"