[Qa-jenkins-scm] [jenkins.debian.net] 01/01: update_jdn: validate sudoers files before deploying them…

Mattia Rizzolo mattia at debian.org
Wed Apr 4 17:25:18 UTC 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository jenkins.debian.net.

commit ea5a01e1e99f18cee49f5ea0f3204f67271a5b6f
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Wed Apr 4 19:25:04 2018 +0200

    update_jdn: validate sudoers files before deploying them…
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 update_jdn.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/update_jdn.sh b/update_jdn.sh
index 76ae421..6e21d83 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -543,6 +543,11 @@ fi
 # deploy package configuration in /etc and /usr
 #
 cd $BASEDIR
+if [ -d "hosts/$HOSTNAME/etc/sudoers.d/" ]; then
+    for f in "hosts/$HOSTNAME/etc/sudoers.d/"* ; do
+        /usr/sbin/visudo -c -f "$f"
+    done
+fi
 sudo cp --preserve=mode,timestamps -r hosts/$HOSTNAME/etc/* /etc
 sudo cp --preserve=mode,timestamps -r hosts/$HOSTNAME/usr/* /usr
 # we ship one or two service files…

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list