From 33bd50a6f314399851cf106279275c6581fa4c44 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 11 Dec 2023 14:23:26 +0100 Subject: [PATCH] Fixing postinstall-scripts/update-networkmanager --- postinstall-scripts/functions.rc | 15 +++++++++++++++ postinstall-scripts/update-networkmanager | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/postinstall-scripts/functions.rc b/postinstall-scripts/functions.rc index 1cbe308..a5bd572 100644 --- a/postinstall-scripts/functions.rc +++ b/postinstall-scripts/functions.rc @@ -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() { diff --git a/postinstall-scripts/update-networkmanager b/postinstall-scripts/update-networkmanager index 48c91b4..60b9ea3 100755 --- a/postinstall-scripts/update-networkmanager +++ b/postinstall-scripts/update-networkmanager @@ -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 } -- 2.39.5