Zypper: Check if zypper is executable

Signed-off-by: Sven Velt <sven@velt.de>
This commit is contained in:
Sven Velt 2011-08-30 11:30:10 +02:00
parent 48300110fd
commit b3d826a515

View file

@ -42,6 +42,12 @@
# From "/etc/sudoers" / "visudo":
# nagios ALL = NOPASSWD: /usr/bin/zypper ref,/usr/bin/zypper -q pchk
#
if [ ! -x /usr/bin/zypper ] ; then
echo 'Zypper CRITICAL - Zypper not found!'
exit 2
fi
# Refresh repositories
sudo /usr/bin/zypper ref >/dev/null 2>&1