]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Removing NetworkManager connection files in postinstall script.
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 7 Dec 2023 11:52:23 +0000 (12:52 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 7 Dec 2023 11:52:23 +0000 (12:52 +0100)
files/postinstall

index a0fddb5d9a1b51ed23c9df1ebf7a8ebc2313ceef..f9b642cb14997c57ffc29a7628463c44fecd0a17 100644 (file)
@@ -132,6 +132,24 @@ for f in /etc/sysconfig/network-scripts/ifcfg-* ; do
     echo "Removing ${f} ..."
     rm -vf "${f}"
 done
+
+echo
+echo "Searching for file like /etc/NetworkManager/system-connections/*.nmconnection ..."
+for f in /etc/NetworkManager/system-connections/*.nmconnection ; do
+    if [ ! -f "${f}" ] ; then
+        continue
+    fi
+    echo "${f}:"
+    ls -l "${f}"
+    echo
+    echo "Content:"
+    echo "---------- snip ----------"
+    cat "${f}"
+    echo "---------- snip ----------"
+    echo "Removing ${f} ..."
+    rm -vf "${f}"
+done
+
 echo
 echo "DHCP leases:"
 echo