2023-09-13 01:29:56 +00:00
|
|
|
%post
|
|
|
|
set -x
|
|
|
|
|
|
|
|
echo "Packages within this disk image"
|
2023-10-04 09:06:23 +00:00
|
|
|
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' | sort -rn
|
2023-09-13 01:29:56 +00:00
|
|
|
|
|
|
|
# Remove all network connections and/or links
|
|
|
|
rm -v -f /etc/sysconfig/network-scripts/ifcfg-link
|
|
|
|
rm -v -f /etc/NetworkManager/system-connections/*.nmconnection
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Like 'machine-id', the 'random-seed' must be generated by the machine on its own
|
|
|
|
rm -v -f /var/lib/systemd/random-seed
|
|
|
|
|
|
|
|
# Remove the RPM database, let it be re-created when the image boots for the first time
|
|
|
|
rm -v -f /var/lib/rpm/__db*
|
|
|
|
|
|
|
|
%end
|