[project @ peter@palfrader.org-20080722211715-69dsek1e30flwd1j]
[mirror/dsa-nagios.git] / dsa-nagios-nrpe-config / debian / postinst
index 7b7ea12..2173952 100644 (file)
@@ -53,8 +53,13 @@ if [ -e /usr/sbin/hpacucli ] && [ -e /dev/cciss/c0d0 ] ; then
                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 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'
                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 '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
 fi
 
@@ -64,6 +69,8 @@ else
        /etc/init.d/nagios-nrpe-server restart || exit $?
 fi
 
+/usr/share/dsa/weak-ssh-keys-check -s /var/cache/dsa/nagios/weak-ssh-keys
+
 #DEBHELPER#
 
 exit 0