From 483068c38c4a0c506a01227f21523c671cb4c407 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 12 Dec 2021 23:27:01 -0500 Subject: [PATCH] Convert preseed to supplemental package list Converts the option that the preseed file gives into a supplemental package list by default to avoid accidentally overwriting required packages. Also add ipmitool to the supplemental packages list. --- templates/install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/install.sh b/templates/install.sh index 618bab7..ade4033 100755 --- a/templates/install.sh +++ b/templates/install.sh @@ -56,8 +56,8 @@ supported_debrelease="buster bullseye" default_debrelease="buster" default_debmirror="http://debian.mirror.rafal.ca/debian" -inclpkglist="lvm2,parted,gdisk,grub-pc,grub-efi-amd64,linux-image-amd64,sudo,vim,gpg,gpg-agent,aptitude,openssh-server,vlan,ifenslave,python3,ca-certificates,curl" -suppkglist="firmware-linux,firmware-linux-nonfree,firmware-bnx2,firmware-bnx2x,ntp" +basepkglist="lvm2,parted,gdisk,grub-pc,grub-efi-amd64,linux-image-amd64,sudo,vim,gpg,gpg-agent,aptitude,openssh-server,vlan,ifenslave,python3,ca-certificates,curl" +suppkglist="firmware-linux,firmware-linux-nonfree,firmware-bnx2,firmware-bnx2x,ntp,ipmitool" # DANGER - THIS PASSWORD IS PUBLIC # It should be used ONLY immediately after booting the PVC node in a SECURE environment @@ -119,6 +119,10 @@ seed_config() { . /tmp/install.seed || exit 1 + if [[ -n "${addpkglist}" ]]; then + suppkglist="${suppkglist},${addpkglist}" + fi + # Handle the target interface target_route="$( ip route show to match ${seed_host} | grep 'scope link' )" target_interface="$( grep -E -o 'e[a-z]+[0-9]+[a-z0-9]*' <<<"${target_route}" )" @@ -639,8 +643,8 @@ mount -t tmpfs tmpfs ${target}/tmp >&2 echo "done." echo -n "Running debootstrap install... " -echo "Command: debootstrap --include=${inclpkglist} ${debrelease} ${target}/ ${debmirror}" >&2 -debootstrap --include=${inclpkglist} ${debrelease} ${target}/ ${debmirror} >&2 +echo "Command: debootstrap --include=${basepkglist} ${debrelease} ${target}/ ${debmirror}" >&2 +debootstrap --include=${basepkglist} ${debrelease} ${target}/ ${debmirror} >&2 echo "done." echo -n "Adding non-free repository (firmware, etc.)... "