50307d4356265b34e515018b56d462081826f15f
max
  Sun Oct 11 21:23:54 2015 -0700
tolerate non-virtualbox VMs better in gbib, refs #16186

diff --git src/browserbox/root/updateBrowser.sh src/browserbox/root/updateBrowser.sh
index d17ddea..c92be1a 100755
--- src/browserbox/root/updateBrowser.sh
+++ src/browserbox/root/updateBrowser.sh
@@ -53,33 +53,36 @@
 if [ "$(id -u)" != "0" ] ; then
    echo "This script must be run as root" 1>&2
    exit 1
 fi
 
 # check if running already, 3 = the main script + its update + the subshell where this command is running
 RUNNING=`ps --no-headers -CupdateBrowser.sh | wc -l`
 if [ ${RUNNING} -gt 3 ] ; then
     #echo update already running
     exit 2
 fi
 	
 # check if we're on VBox and if yes, if auto-updates were deactivated from the Vbox host via a property
 if which VBoxControl > /dev/null; then
    if VBoxControl guestproperty get gbibAutoUpdateOff | grep -xq "Value: yes" ; then
+   # exit only if no argument specified on command line = run from cronjob
+       if [ "$#" -eq 0 ] ; then
            exit 6
        fi
    fi
+fi
 
 # check if we have internet
 wget -q --tries=1 --timeout=10 --spider http://hgdownload.soe.ucsc.edu -O /dev/null
 if [ $? -ne 0 ] ; then
     exit 3
 fi
 
 # check flag if run with no parameter (=from cron)
 if [ "$#" -eq 0 ] ; then
    # check a flag file to see if anything on hgdownload actually changed
    if /root/urlIsNotNewerThanFile $UPDATEFLAG /root/lastUpdateTime.flag
    then
        exit 0
    fi
 fi