rocky-linux-generic-images/includes/post-install.ksi

22 lines
659 B
Plaintext

%include bootloader-stuff.ksi
%post
# The script that expands root partition
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
curl 'https://git.resf.org/thefossguy/rocky-linux-generic-images/raw/branch/r9/scripts/expand-rootfs.sh' --output expand-rootfs.sh
mv -v f expand-rootfs.sh /usr/local/bin/expand-rootfs.sh
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
# Rebuild the RPM database
rpm --rebuilddb
# Remove 'ifcfg-link' on generated images
rm -v -f /etc/sysconfig/network-scripts/ifcfg-link
# The 'machine-id' needs to be unique for each machine so remove ours to prevent duplication
rm -v -f /etc/machine-id
touch /etc/machine-id
%end