sbc-images/includes/post/cleanup.ksi

22 lines
657 B
Plaintext
Raw Permalink Normal View History

2023-09-13 01:29:56 +00:00
%post
set -x
# Remove the temporary 'resolv.conf' file so that the user defines it
rm -v -f /etc/resolv.conf
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