]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Removing package cloud-init, and performing autoremove of packages in postinstall...
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 2 Nov 2023 10:11:35 +0000 (11:11 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 2 Nov 2023 10:11:35 +0000 (11:11 +0100)
postinstall-scripts/update-all-packages

index 002552790f53898fc692c91b0cf580f06aa326b9..1819baa29d6790baf29e831dfefa02f71bbafae0 100755 (executable)
@@ -192,6 +192,12 @@ ok==1 {print "ip_resolve=4"; ok=0}
     info "Making cache ..."
     exec_cmd ${tool} --assumeyes makecache
 
+    echo
+    info "Removing cloud-init ..."
+    if rpm -qa | grep --quiet --perl-regexp '^cloud-init-\d' ; then
+        exec_cmd ${tool}  --assumeyes erase cloud-init
+    fi
+
     echo
     info "Doing upgrade ..."
     exec_cmd ${tool} --assumeyes upgrade
@@ -206,6 +212,10 @@ ok==1 {print "ip_resolve=4"; ok=0}
     info "Making cache again ..."
     exec_cmd ${tool} --assumeyes makecache
 
+    echo
+    info "Removing pointless stuff ..."
+    exec_cmd ${tool} --assumeyes autoremove
+
 }
 
 #------------------------------------------------------------------------------