Use /etc/sudoers.d now that it exists, instead of appending to /etc/sudoers
authorQuentin Smith <quentin@mit.edu>
Mon, 6 Jan 2014 07:10:58 +0000 (02:10 -0500)
committerQuentin Smith <quentin@mit.edu>
Mon, 6 Jan 2014 07:10:58 +0000 (02:10 -0500)
console/etc/sudoers.d/xvm-munin-console-config [new file with mode: 0644]
debian/changelog
debian/xvm-munin-console-config.install
debian/xvm-munin-console-config.postinst
debian/xvm-munin-host-config.postinst
debian/xvm-munin-master-config.postinst
debian/xvm-munin-remote-config.postinst
host/etc/sudoers.d/xvm-munin-host-config [new file with mode: 0644]
master/etc/sudoers.d/xvm-munin-master-config [new file with mode: 0644]
remote/etc/sudoers.d/xvm-munin-remote-config [new file with mode: 0644]

diff --git a/console/etc/sudoers.d/xvm-munin-console-config b/console/etc/sudoers.d/xvm-munin-console-config
new file mode 100644 (file)
index 0000000..7364157
--- /dev/null
@@ -0,0 +1,3 @@
+# So munin can sudo to get to postfix queue info
+munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
+munin ALL=(munin) SETENV: NOPASSWD: ALL
index 32499c9..a5d2ebe 100644 (file)
@@ -1,8 +1,10 @@
 xvm-munin-config (0.0.18) unstable; urgency=low
 
   * Add xen_net munin plugin for monitoring network status.
 xvm-munin-config (0.0.18) unstable; urgency=low
 
   * Add xen_net munin plugin for monitoring network status.
+  * Use /etc/sudoers.d now that it exists, instead of appending to
+    /etc/sudoers
 
 
- -- Quentin Smith <quentin@mit.edu>  Mon, 06 Jan 2014 01:41:38 -0500
+ -- Quentin Smith <quentin@mit.edu>  Mon, 06 Jan 2014 02:10:49 -0500
 
 xvm-munin-config (0.0.17) unstable; urgency=low
 
 
 xvm-munin-config (0.0.17) unstable; urgency=low
 
index c0d3211..d164987 100644 (file)
@@ -1,2 +1,3 @@
 common/* .
 common/* .
+console/* .
 debian/munin-node.conf.xvm.mako etc/munin
 debian/munin-node.conf.xvm.mako etc/munin
index e19832a..2315c0b 100755 (executable)
@@ -23,14 +23,6 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
         # So munin can read the mail log
         adduser munin adm
         
-        # So munin can sudo to get to postfix queue info
-        cat >>/etc/sudoers <<EOF
-### BEGIN xvm-munin-config
-munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
-munin ALL=(munin) SETENV: NOPASSWD: ALL
-### END xvm-munin-config
-EOF
-        
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
         
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
         
index b182729..890770a 100755 (executable)
@@ -23,17 +23,6 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
         # So munin can read the mail log
         adduser munin adm
         
-        # So munin can sudo to get to postfix queue info
-        # and smartctl info
-        # and info about running domains
-        cat >>/etc/sudoers <<EOF
-### BEGIN xvm-munin-config
-munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
-munin ALL=(munin) SETENV: NOPASSWD: ALL
-munin ALL=(root) SETENV: NOPASSWD: /etc/munin/plugins/hddtemp_smartctl , /etc/munin/plugins/smart_* , /etc/munin/plugins/xen_*
-### END xvm-munin-config
-EOF
-        
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
 
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
 
index 721e584..2b8dfdf 100755 (executable)
@@ -22,15 +22,7 @@ case "$1" in
     configure)
         # So munin can read the mail log
         adduser munin adm
     configure)
         # So munin can read the mail log
         adduser munin adm
-        
-        # So munin can sudo to get to postfix queue info
-        cat >>/etc/sudoers <<EOF
-### BEGIN xvm-munin-config
-munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
-munin ALL=(munin) SETENV: NOPASSWD: ALL
-### END xvm-munin-config
-EOF
-        
+
         # So munin can read from the database
         su postgres -c 'createuser -S -D -R munin' || true
         su postgres -c 'psql invirt --quiet' <<EOF
         # So munin can read from the database
         su postgres -c 'createuser -S -D -R munin' || true
         su postgres -c 'psql invirt --quiet' <<EOF
index e19832a..9b2918a 100755 (executable)
@@ -22,18 +22,10 @@ case "$1" in
     configure)
         # So munin can read the mail log
         adduser munin adm
     configure)
         # So munin can read the mail log
         adduser munin adm
-        
-        # So munin can sudo to get to postfix queue info
-        cat >>/etc/sudoers <<EOF
-### BEGIN xvm-munin-config
-munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
-munin ALL=(munin) SETENV: NOPASSWD: ALL
-### END xvm-munin-config
-EOF
-        
+
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
-        
+
         invoke-rc.d munin-node restart
     ;;
 
         invoke-rc.d munin-node restart
     ;;
 
diff --git a/host/etc/sudoers.d/xvm-munin-host-config b/host/etc/sudoers.d/xvm-munin-host-config
new file mode 100644 (file)
index 0000000..40f2325
--- /dev/null
@@ -0,0 +1,6 @@
+# So munin can sudo to get to postfix queue info
+# and smartctl info
+# and info about running domains
+munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
+munin ALL=(munin) SETENV: NOPASSWD: ALL
+munin ALL=(root) SETENV: NOPASSWD: /etc/munin/plugins/hddtemp_smartctl , /etc/munin/plugins/smart_* , /etc/munin/plugins/xen_*
diff --git a/master/etc/sudoers.d/xvm-munin-master-config b/master/etc/sudoers.d/xvm-munin-master-config
new file mode 100644 (file)
index 0000000..7364157
--- /dev/null
@@ -0,0 +1,3 @@
+# So munin can sudo to get to postfix queue info
+munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
+munin ALL=(munin) SETENV: NOPASSWD: ALL
diff --git a/remote/etc/sudoers.d/xvm-munin-remote-config b/remote/etc/sudoers.d/xvm-munin-remote-config
new file mode 100644 (file)
index 0000000..7364157
--- /dev/null
@@ -0,0 +1,3 @@
+# So munin can sudo to get to postfix queue info
+munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
+munin ALL=(munin) SETENV: NOPASSWD: ALL