@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2013-07-16 18:42:56 +0200 (Tue, 16 Jul 2013) $
-# $Rev: 6280 $
+# $LastChangedDate: 2013-08-02 20:41:57 +0200 (Fri, 02 Aug 2013) $
+# $Rev: 6370 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -212,7 +212,7 @@
elif [ -n "${ZYP}" ] && [ -f /etc/SuSE-release ] ; then
REL=`${LSB_RELEASE} -r | ${AWK} '{print $NF}'`
case ${REL} in
- 11|11.1|11.2|11.3|11.4|12.1|12.2)
+ 11|11.1|11.2|11.3|11.4|12.1|12.2|12.3)
CUPD="`${ZYP} -q lu | ${GREP} ${PKG}`"
if [ -n "${CUPD}" ] ; then
${ZYP} -q -n update ${PKG}
@@ -510,9 +510,9 @@
[ "`is_disabled $FUNCNAME`" == "1" ] && return
HN=`${HOSTNAME} -f 2>/dev/null`
if [ -z "${HN}" ] ; then
- if [ -s /etc/sysconfig/network ] ; then
+ if [ -s /etc/sysconfig/network ] && [ -f /etc/sysconfig/network ] ; then
HN=`${CAT} /etc/sysconfig/network | ${GREP} ^HOSTNAME | ${AWK} -F= '{print $NF}'`
- elif [ -s /etc/HOSTNAME ] ; then
+ elif [ -s /etc/HOSTNAME ] && [ -f /etc/HOSTNAME ] ; then
HN=`${CAT} /etc/HOSTNAME`
fi
fi
|