@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-09-17 16:20:59 +0200 (Mon, 17 Sep 2012) $
-# $Rev: 1828 $
+# $LastChangedDate: 2012-09-17 21:53:15 +0200 (Mon, 17 Sep 2012) $
+# $Rev: 1851 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -199,12 +199,12 @@
YUM=`which yum 2>/dev/null`
ZYP=`which zypper 2>/dev/null`
if [ -n "${PKG}" ] ; then
- if [ -n "${YUM}" && -f /etc/redhat-release ] ; then
+ if [ -n "${YUM}" ] && [ -f /etc/redhat-release ] ; then
CUPD="`${YUM} check-update ${PK} | ${TAIL} -n1 | ${AWK} '{print $1}'`"
if [ -n "${CUPD}" ] ; then
${YUM} -q -y update ${PKG}
fi
- elif [ -n "${ZYP}" && -f /etc/SuSE-release ] ; then
+ elif [ -n "${ZYP}" ] && [ -f /etc/SuSE-release ] ; then
CUPD="`${ZYP} -q lu | ${GREP} ${PKG}`"
if [ -n "${CUPD}" ] ; then
${ZYP} -q -n update ${PKG}
|