=================================================================== RCS file: /cvs/mss/netupdate/networkupdate.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mss/netupdate/networkupdate.sh 2013/07/18 14:45:59 1.6 +++ mss/netupdate/networkupdate.sh 2013/07/19 08:06:43 1.7 @@ -3,6 +3,11 @@ # Use config file instead of editing script itself source netupdate.conf +# Add version file if it's missing (useful on clean systems) +if [ ! -e /var/lib/mss/version ]; then + echo "0.0" > /var/lib/mss/version +fi + # Set some variables LOCK=/var/run/mssupdate.lock LOCALVERSION=`cat /var/lib/mss/version` @@ -10,11 +15,6 @@ # Get apropriate programm version and full path to it from fileserver VERSION=`ssh $USER@$SERVER grep $MYNAME $HOSTLIST |awk '{print $2}'` UPDATEDIR=`ssh $USER@$SERVER grep $MYNAME $HOSTLIST |awk '{print $3}'` - -# Add version file if it's missing (useful on clean systems) -if [ ! -e /var/lib/mss/version ]; then - echo "0.0" > /var/lib/mss/version -fi # Check whether we have latest version if [ "$(echo "$LOCALVERSION < $VERSION" |bc -l )" -eq 1 ] && [ ! -e $LOCK ]; then