]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing postinstall-scripts/update-networkmanager
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 11 Dec 2023 13:23:26 +0000 (14:23 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 11 Dec 2023 13:23:26 +0000 (14:23 +0100)
postinstall-scripts/functions.rc
postinstall-scripts/update-networkmanager

index 1cbe308d582a0c4eaa88762a864043f9b0c71e76..a5bd57286d40dd0449bf9bdc76ca819bbbf49a6c 100644 (file)
@@ -386,6 +386,21 @@ CHOWN() {
     eval ${cmd}
 }
 
+#------------------------------------------------------------------------------
+CHMOD() {
+
+    local cmd="chmod $*"
+    if [[ "${VERBOSE}" == "y" ]] ; then
+        cmd="chmod --verbose $*"
+    fi
+    if [[ "${SIMULATE}" == "y" ]] ; then
+        info "Executing: ${cmd}"
+        return
+    fi
+    debug "Executing: ${cmd}"
+    eval ${cmd}
+}
+
 #------------------------------------------------------------------------------
 line() {
 
index 48c91b43ae185b5ec32009046edaf168202ee2ea..60b9ea31de2452a5c6fac2802e3218918f1a28b4 100755 (executable)
@@ -167,6 +167,10 @@ generate_nm_file() {
     if [[ "${SIMULATE}" != "y" ]] ; then
         echo -n "${file_content}" > "${dev_file}"
     fi
+    CHMOD 0600 "${dev_file}"
+    if [[ "${SIMULATE}" != "y" ]] ; then
+        ls -l "${dev_file}"
+    fi
 
 }