Zypper: Check if zypper is executable
Signed-off-by: Sven Velt <sven@velt.de>
This commit is contained in:
parent
48300110fd
commit
b3d826a515
|
@ -42,6 +42,12 @@
|
||||||
# From "/etc/sudoers" / "visudo":
|
# From "/etc/sudoers" / "visudo":
|
||||||
# nagios ALL = NOPASSWD: /usr/bin/zypper ref,/usr/bin/zypper -q pchk
|
# 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
|
# Refresh repositories
|
||||||
sudo /usr/bin/zypper ref >/dev/null 2>&1
|
sudo /usr/bin/zypper ref >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue