From: Peter Palfrader Date: Wed, 7 May 2008 20:04:37 +0000 (+0000) Subject: [project @ peter@palfrader.org-20080507200437-4agmawt819bxnzok] X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=f02a3a317be3bccd97c2a1249cd5ee93334eac33;p=mirror%2Fdsa-nagios.git [project @ peter@palfrader.org-20080507200437-4agmawt819bxnzok] Tell which lines to add to sudoers --- diff --git a/dsa-nagios-nrpe-config/debian/postinst b/dsa-nagios-nrpe-config/debian/postinst index 5529e94..7b7ea12 100644 --- a/dsa-nagios-nrpe-config/debian/postinst +++ b/dsa-nagios-nrpe-config/debian/postinst @@ -47,6 +47,17 @@ if [ -e /etc/sudoers ] ; then fi fi +if [ -e /usr/sbin/hpacucli ] && [ -e /dev/cciss/c0d0 ] ; then + if ! grep '^nagios.*hpacucli' /etc/sudoers > /dev/null; then + echo + echo 'WARNIG: Add these lines to sudoers:' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller all show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd all show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 show status' + echo + fi +fi + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d nagios-nrpe-server restart || exit $? else