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.
This commit is contained in:
		@@ -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.)... "
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user