From: Frank Brehm Date: Mon, 11 Dec 2023 13:23:26 +0000 (+0100) Subject: Fixing postinstall-scripts/update-networkmanager X-Git-Tag: 1.8.2~1^2 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=33bd50a6f314399851cf106279275c6581fa4c44;p=pixelpark%2Fcreate-terraform.git Fixing postinstall-scripts/update-networkmanager --- 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 }