openmamba-netsrpms: fix: don't report for updates available when network is down
This commit is contained in:
parent
25529aee96
commit
72946b5b56
@ -58,7 +58,12 @@ for pckname in $PACKAGES; do
|
||||
|
||||
icon=`grep Icon= /usr/share/applications/openmamba-$pckname.desktop | sed "s|Icon=||"`
|
||||
|
||||
SRPM_VERSION=${SRPMVERSION[${pckname}]}-${SRPMRELEASE[${pckname}]}
|
||||
SRPMVER="${SRPMVERSION[${pckname}]}"
|
||||
if [ "$SRPMVER" ]; then
|
||||
SRPM_VERSION=${SRPMVER}-${SRPMRELEASE[${pckname}]}
|
||||
else
|
||||
SRPM_VERSION=
|
||||
fi
|
||||
|
||||
RPM_INSTALLED=`rpm -q $pckname`
|
||||
[ $? -eq 0 ] || RPM_INSTALLED=
|
||||
@ -72,13 +77,13 @@ for pckname in $PACKAGES; do
|
||||
echo $"Last version: $SRPM_VERSION"
|
||||
echo
|
||||
|
||||
if [ "$RPM_INSTALLED_VERSION" != "$SRPM_VERSION" ]; then
|
||||
if [ "$SRPM_VERSION" -a "$RPM_INSTALLED_VERSION" != "$SRPM_VERSION" ]; then
|
||||
if [ "$RPM_INSTALLED_VERSION" ]; then
|
||||
UPDATE_NEEDED=1
|
||||
elif [ "$UPGRADE_MODE" ]; then
|
||||
continue
|
||||
fi
|
||||
elif [ ! "$FORCE_MODE" ]; then
|
||||
elif [ ! "$FORCE_MODE" -a "$SRPM_VERSION" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user