From b2609a3926d833556c985e195a9171df960e7690 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Sat, 29 Jul 2023 19:30:48 +0530 Subject: [PATCH] remove any existing RPM DB and recreate it at your initial boot --- includes/post-install.ksi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/post-install.ksi b/includes/post-install.ksi index 49f636c..61774d1 100644 --- a/includes/post-install.ksi +++ b/includes/post-install.ksi @@ -11,9 +11,6 @@ curl 'https://git.resf.org/thefossguy/rocky-linux-generic-images/raw/branch/r9/s [ -f /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 @@ -27,4 +24,7 @@ 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