Lots of improvements everywhere
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
%include /tmp/packer_ks/centos-stream/CentOS-8-Stream-x86_64-Vagrant.ks
|
||||
|
||||
url --mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=BaseOS&infra=stock
|
||||
repo --name=AppStream --mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock
|
||||
|
||||
%include /tmp/packer_ks/centos-upstream/CentOS-8-Stream-x86_64-Vagrant.ks
|
||||
network --bootproto=dhcp --activate
|
||||
reboot
|
||||
|
||||
%pre --interpreter /bin/bash --log /tmp/greg
|
||||
# This gets us the upstream kickstarter files
|
||||
cmdline=$(cat /proc/cmdline)
|
||||
ks=$(printf "${cmdline}" | sed -E -e 's/.*inst\.ks=([^ ]*).*/\1/')
|
||||
mkdir -p /tmp/packer_ks
|
||||
cd /tmp/packer_ks
|
||||
# 3 levels up!
|
||||
wget -m -nH "$(dirname "$(dirname "$(dirname "${ks}")")")"
|
||||
|
||||
set -ex
|
||||
# This allows us to support virtualbox
|
||||
mkdir /tmp/sr1
|
||||
mount /dev/sr1 /tmp/sr1
|
||||
cp -r /tmp/sr1/http /tmp/packer_ks
|
||||
|
||||
if [ ! -e /dev/vda ]; then
|
||||
sed -i -e 's/drives=vda/drives=sda/' -e 's/ondisk=vda/ondisk=sda/' -e 's/shutdown/reboot/' /tmp/packer_ks/centos-upstream/*
|
||||
sed -i -e 's/drives=vda/drives=sda/' -e 's/ondisk=vda/ondisk=sda/' /tmp/packer_ks/centos-stream/*
|
||||
fi
|
||||
%end
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
url --mirrorlist=http://mirrorlist.centos.org/?release=9-stream&arch=x86_64&repo=BaseOS&infra=stock
|
||||
repo --name=AppStream --mirrorlist=http://mirrorlist.centos.org/?release=9-stream&arch=x86_64&repo=AppStream&infra=stock
|
||||
|
||||
%include /tmp/packer_ks/centos-stream/CentOS-9-Stream-x86_64-Vagrant.ks
|
||||
|
||||
%pre --interpreter /bin/bash --log /tmp/greg
|
||||
# This gets us the upstream kickstarter files
|
||||
cmdline=$(cat /proc/cmdline)
|
||||
ks=$(printf "${cmdline}" | sed -E -e 's/.*inst\.ks=([^ ]*).*/\1/')
|
||||
mkdir -p /tmp/packer_ks
|
||||
cd /tmp/packer_ks
|
||||
# 3 levels up!
|
||||
wget -m -nH "$(dirname "$(dirname "${ks}")")"
|
||||
url --metalink=https://mirrors.centos.org/metalink?arch=x86_64&repo=centos-baseos-9-stream
|
||||
repo --name=AppStream --metalink=https://mirrors.centos.org/metalink?arch=x86_64&repo=centos-appstream-9-stream
|
||||
reboot
|
||||
|
||||
%pre --interpreter /bin/bash --log /tmp/greg
|
||||
set -ex
|
||||
# This allows us to support virtualbox
|
||||
mkdir /tmp/sr1
|
||||
mount /dev/sr1 /tmp/sr1
|
||||
cp -r /tmp/sr1/http /tmp/packer_ks
|
||||
|
||||
if [ ! -e /dev/vda ]; then
|
||||
sed -i -e 's/drives=vda/drives=sda/' -e 's/ondisk=vda/ondisk=sda/' -e 's/shutdown/reboot/' /tmp/packer_ks/centos-stream/*
|
||||
sed -i -e 's/drives=vda/drives=sda/' -e 's/ondisk=vda/ondisk=sda/' /tmp/packer_ks/centos-stream/*
|
||||
fi
|
||||
%end
|
||||
|
||||
Reference in New Issue
Block a user