Don't just keep adding to the sudoers file in xvm-munin-config 0.0.2
authorEvan Broder <broder@mit.edu>
Tue, 25 Nov 2008 13:10:09 +0000 (08:10 -0500)
committerEvan Broder <broder@mit.edu>
Tue, 25 Nov 2008 13:10:09 +0000 (08:10 -0500)
svn path=/trunk/packages/xvm-munin-config/; revision=1767

debian/changelog
debian/xvm-munin-console-config.postinst
debian/xvm-munin-host-config.postinst
debian/xvm-munin-master-config.postinst
debian/xvm-munin-remote-config.postinst

index a2f14fe..46ddb36 100644 (file)
@@ -1,3 +1,13 @@
+xvm-munin-config (0.0.2) unstable; urgency=low
+
+  [ Quentin Smith ]
+  * Add a monitoring script for domain CPU utilization
+  
+  [ Evan Broder ]
+  * Don't just keep adding to the sudoers file
+
+ -- Evan Broder <broder@mit.edu>  Tue, 25 Nov 2008 08:08:26 -0500
+
 xvm-munin-config (0.0.1) unstable; urgency=low
 
   * Initial Release.
index e19832a..c992d7f 100755 (executable)
@@ -23,6 +23,9 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
+        # First clear out the old stuff we threw in /etc/sudoers
+        perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+        
         # So munin can sudo to get to postfix queue info
         cat >>/etc/sudoers <<EOF
 ### BEGIN xvm-munin-config
index ce981db..3dbbeb6 100755 (executable)
@@ -23,7 +23,12 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
+        # First clear out the old stuff we threw in /etc/sudoers
+        perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+        
         # 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
index 721e584..407cbef 100755 (executable)
@@ -23,6 +23,9 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
+        # First clear out the old stuff we threw in /etc/sudoers
+        perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+        
         # So munin can sudo to get to postfix queue info
         cat >>/etc/sudoers <<EOF
 ### BEGIN xvm-munin-config
index e19832a..c992d7f 100755 (executable)
@@ -23,6 +23,9 @@ case "$1" in
         # So munin can read the mail log
         adduser munin adm
         
+        # First clear out the old stuff we threw in /etc/sudoers
+        perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+        
         # So munin can sudo to get to postfix queue info
         cat >>/etc/sudoers <<EOF
 ### BEGIN xvm-munin-config