[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, master, updated. 0c3827aca406859bd5d5512224a0c0a3cfa685d2

Bernd Zeimetz bernd at bzed.de
Fri Nov 11 20:23:30 UTC 2011


The following commit has been merged in the master branch:
commit 791a318c89d1cb20d0b5c4ba7722c6187bf6c262
Author: Bernd Zeimetz <bernd at bzed.de>
Date:   Mon Nov 7 10:05:12 2011 +0100

    Install necessary sudo permissions for WATO.

diff --git a/debian/check-mk-multisite.install b/debian/check-mk-multisite.install
index 14ddd3f..8ead364 100644
--- a/debian/check-mk-multisite.install
+++ b/debian/check-mk-multisite.install
@@ -1,2 +1,3 @@
 usr/share/check_mk/web
 var/lib/check_mk/web
+etc/sudoers.d/check_mk_wato
diff --git a/debian/control b/debian/control
index 1015fb5..e57a167 100644
--- a/debian/control
+++ b/debian/control
@@ -96,6 +96,7 @@ Description: general purpose nagios-plugin for retrieving data
 Package: check-mk-multisite
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-python, check-mk-config-nagios3 | check-mk-config-icinga
+Recommends: sudo
 Suggests: check-mk-livestatus
 Description: general purpose nagios-plugin for retrieving data
  Check_mk adopts a new a approach for collecting data from operating systems
diff --git a/debian/patches/00list b/debian/patches/00list
index 43d5536..ff257cd 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1 +1,2 @@
 01_fix_livestatus
+02_wato-sudoers
diff --git a/debian/patches/02_wato-sudoers.dpatch b/debian/patches/02_wato-sudoers.dpatch
new file mode 100755
index 0000000..d19513c
--- /dev/null
+++ b/debian/patches/02_wato-sudoers.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## wato-sudoers-location.dpatch by Bernd Zeimetz <bzed at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Install WATO sudoers line into /etc/sudoers.d/check_mk_WATO
+
+ at DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-check-mk~/setup.sh pkg-check-mk/setup.sh
+--- pkg-check-mk~/setup.sh	2011-11-10 09:50:10.000000000 +0100
++++ pkg-check-mk/setup.sh	2011-11-10 09:50:56.207820998 +0100
+@@ -571,28 +571,12 @@
+ 	return
+     fi
+  
+-    sudolines="Defaults:$wwwuser !requiretty\n$wwwuser ALL = (root) NOPASSWD: $bindir/check_mk --automation *"
+-
+-    if [ ! -e /etc/sudoers ] ; then
+-        echo "You do not have sudo installed. Please install sudo "
+-        echo "and add the following line to /etc/sudoers if you want"
+-        echo "to use WATO - the Check_MK Web Administration Tool"
+-        echo
+-        echo -e "$sudolines"
+-        echo 
+-        echo
+-        return
+-    fi
+-
+-    if fgrep -q 'check_mk --automation' /etc/sudoers 2>/dev/null
+-    then
+-        # already present. Do not touch.
+-        return
+-    fi
++    sudolines="Defaults:$wwwuser !requiretty\n$wwwuser ALL = (nagios) NOPASSWD: $bindir/check_mk --automation *"
+ 
+-    echo >> /etc/sudoers
+-    echo "# Needed for  WATO - the Check_MK Web Administration Tool" >> /etc/sudoers
+-    echo -e "$sudolines" >> /etc/sudoers
++    mkdir -p $DESTDIR/etc/sudoers.d
++    echo >> $DESTDIR/etc/sudoers.d/check_mk_wato
++    echo "# Needed for  WATO - the Check_MK Web Administration Tool" >> $DESTDIR/etc/sudoers.d/check_mk_wato
++    echo -e "$sudolines" >> $DESTDIR/etc/sudoers.d/check_mk_wato
+ }
+ 
+ while true

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list