@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-09-11 15:41:47 +0200 (Tue, 11 Sep 2012) $
-# $Rev: 1770 $
+# $LastChangedDate: 2012-09-11 16:46:33 +0200 (Tue, 11 Sep 2012) $
+# $Rev: 1771 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -200,16 +200,14 @@
ZYP=`which zypper 2>/dev/null`
if [ -n "${PKG}" ] ; then
if [ -n "${YUM}" ] ; then
- CUPD="${YUM} check-update ${PK} | ${TAIL} -n1 | ${AWK} '{print $1}'"
- if [ -n "`${CUPD}`" ] ; then
- UPD="${YUM} -y update ${PKG}"
- ${UPD}
+ CUPD="`${YUM} check-update ${PK} | ${TAIL} -n1 | ${AWK} '{print $1}'`"
+ if [ -n "${CUPD}" ] ; then
+ ${YUM} -y update ${PKG}
fi
elif [ -n "${ZYP}" ] ; then
- CUPD="${ZYP} -q lu | ${GREP} ${PKG}"
- if [ -n "`${CUPD}`" ] ; then
- UPD="${ZYP} -n update ${PKG}"
- ${UPD}
+ CUPD="`${ZYP} -q lu | ${GREP} ${PKG}`"
+ if [ -n "${CUPD}" ] ; then
+ ${ZYP} -n update ${PKG}
fi
fi
fi
|