use _PACKAGES from /etc/archboot/defaults as standard package install source

This commit is contained in:
Tobias Powalowski 2022-03-19 08:44:48 +01:00
parent eb95b0d38c
commit 6ea03ba362
4 changed files with 15 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# defaults for archboot
# additional packages to install eg. firmware
_PACKAGES="linux-firmware"
# packages to install eg. firmware
_PACKAGES="base linux linux-firmware"
# grub config to use
_GRUB_CONFIG="/usr/share/archboot/grub/archboot-main-grub.cfg"
_GRUB_BACKGROUND="/usr/share/archboot/grub/archboot-background.png"

View file

@ -63,7 +63,10 @@ chroot_umount()
# package_installation
install_packages() {
PACKAGES="base linux linux-firmware"
# add packages from archboot defaults
PACKAGES=$(grep '^_PACKAGES' /etc/archboot/defaults | sed -e 's#_PACKAGES=##g' -e 's#"##g')
# fallback if _PACKAGES is empty
[[ -z "${PACKAGES}" ]] && PACKAGES="base linux linux-firmware"
# Add packages which are not in core repository
if lsblk -rnpo FSTYPE | grep -q btrfs; then
! echo "${PACKAGES}" | grep -qw btrfs-progs && PACKAGES="${PACKAGES} btrfs-progs"

View file

@ -2599,8 +2599,11 @@ install_packages() {
fi
prepare_pacman
PACKAGES=""
DIALOG --yesno "Next step will install base, linux, linux-firmware, netctl and filesystem tools for a minimal system.\n\nDo you wish to continue?" 10 50 || return 1
PACKAGES="base linux linux-firmware"
# add packages from archboot defaults
PACKAGES=$(grep '^_PACKAGES' /etc/archboot/defaults | sed -e 's#_PACKAGES=##g' -e 's#"##g')
# fallback if _PACKAGES is empty
[[ -z "${PACKAGES}" ]] && PACKAGES="base linux linux-firmware"
DIALOG --yesno "Next step will install ${PACKAGES}, netctl and filesystem tools for a minimal system.\n\nDo you wish to continue?" 10 50 || return 1
# Add packages which are not in core repository
if [[ -n "$(pgrep dhclient)" ]]; then
! echo "${PACKAGES}" | grep -qw dhclient && PACKAGES="${PACKAGES} dhclient"

View file

@ -125,8 +125,8 @@ _umount_special() {
}
_install_base_packages() {
echo "Installing packages base linux and ${_PACKAGES} to ${1} ..."
pacman --root "${1}" -Sy base linux "${_PACKAGES}" --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --noconfirm --cachedir "${_CACHEDIR}" >/dev/null 2>&1
echo "Installing packages ${_PACKAGES} to ${1} ..."
pacman --root "${1}" -Sy "${_PACKAGES}" --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --noconfirm --cachedir "${_CACHEDIR}" >/dev/null 2>&1
}
_install_archboot() {
@ -135,11 +135,11 @@ _install_archboot() {
}
_aarch64_install_base_packages() {
echo "Installing packages base linux and ${_PACKAGES} to ${1} ..."
echo "Installing packages ${_PACKAGES} to ${1} ..."
if [[ -e "$(basename "${_PACMAN_CONF}")" ]]; then
_PACMAN_CONF=$(basename "${_PACMAN_CONF}")
fi
systemd-nspawn -q -D "${1}" /bin/bash -c "pacman -Sy base linux ${_PACKAGES} --config ${_PACMAN_CONF} --ignore systemd-resolvconf --noconfirm" >/dev/null 2>&1
systemd-nspawn -q -D "${1}" /bin/bash -c "pacman -Sy ${_PACKAGES} --config ${_PACMAN_CONF} --ignore systemd-resolvconf --noconfirm" >/dev/null 2>&1
}
_aarch64_install_archboot() {