From 59a4b83f685dfee01f3f39af9ec0acfd509763a1 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 22 Jul 2008 21:26:27 +0000 Subject: [PATCH] [project @ peter@palfrader.org-20080722212627-x0iihf7gs7z89qb5] Don't just print the sudoers lines to stdout, tell the admin to add them also. --- dsa-nagios-nrpe-config/debian/changelog | 7 +++++++ dsa-nagios-nrpe-config/debian/postinst | 2 ++ 2 files changed, 9 insertions(+) diff --git a/dsa-nagios-nrpe-config/debian/changelog b/dsa-nagios-nrpe-config/debian/changelog index aabb758..53245b9 100644 --- a/dsa-nagios-nrpe-config/debian/changelog +++ b/dsa-nagios-nrpe-config/debian/changelog @@ -1,3 +1,10 @@ +dsa-nagios-nrpe-config (48) unstable; urgency=low + + * Don't just print the sudoers lines to stdout, tell the admin to add them + also. + + -- Peter Palfrader Tue, 22 Jul 2008 21:25:56 +0000 + dsa-nagios-nrpe-config (47) unstable; urgency=low * dsa-check-hpacucli: Check transfer speed of disks. diff --git a/dsa-nagios-nrpe-config/debian/postinst b/dsa-nagios-nrpe-config/debian/postinst index 2173952..3f0c530 100644 --- a/dsa-nagios-nrpe-config/debian/postinst +++ b/dsa-nagios-nrpe-config/debian/postinst @@ -58,6 +58,8 @@ if [ -e /usr/sbin/hpacucli ] && [ -e /dev/cciss/c0d0 ] ; then echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 show status' echo elif ! grep '^nagios.*hpacucli.* pd .*:.* show' /etc/sudoers > /dev/null; then + echo + echo 'WARNIG: Add these lines to sudoers:' echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]\:[0-9] show' echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]I\:[0-9]\:[0-9] show' fi -- 2.20.1