2023-07-28 07:24:36 +00:00
|
|
|
%include bootloader-stuff.ksi
|
2023-07-28 04:44:57 +00:00
|
|
|
|
2023-07-28 07:24:36 +00:00
|
|
|
%post
|
2023-07-27 14:23:23 +00:00
|
|
|
|
2023-07-28 09:21:09 +00:00
|
|
|
# Setup networking temporarily
|
|
|
|
echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
|
|
|
|
2023-07-28 06:40:01 +00:00
|
|
|
# The script that expands root partition
|
2023-07-28 08:25:52 +00:00
|
|
|
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
|
2023-07-28 09:23:02 +00:00
|
|
|
curl 'https://git.resf.org/thefossguy/rocky-linux-generic-images/raw/branch/r9/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh
|
|
|
|
[ -f /usr/local/bin/expand-rootfs.sh ] && \
|
|
|
|
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
|
2023-07-28 06:40:01 +00:00
|
|
|
|
2023-07-27 14:23:23 +00:00
|
|
|
# Rebuild the RPM database
|
|
|
|
rpm --rebuilddb
|
|
|
|
|
2023-07-28 06:40:01 +00:00
|
|
|
# Remove 'ifcfg-link' on generated images
|
2023-07-28 08:25:52 +00:00
|
|
|
rm -v -f /etc/sysconfig/network-scripts/ifcfg-link
|
2023-07-28 06:40:01 +00:00
|
|
|
|
2023-07-28 09:21:09 +00:00
|
|
|
# Remove the temporary 'resolv.conf' file
|
|
|
|
rm -v f /etc/resolv.conf
|
|
|
|
|
2023-07-28 06:40:01 +00:00
|
|
|
# The 'machine-id' needs to be unique for each machine so remove ours to prevent duplication
|
2023-07-28 08:25:52 +00:00
|
|
|
rm -v -f /etc/machine-id
|
2023-07-28 06:40:01 +00:00
|
|
|
touch /etc/machine-id
|
|
|
|
|
2023-07-27 14:23:23 +00:00
|
|
|
%end
|