VirtualBox

Ignore:
Timestamp:
Sep 6, 2010 2:38:46 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65578
Message:

Linux installer: vboxweb-service fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r32237 r32251  
    145145
    146146# check for active VMs
    147 if pidof VBoxSVC > /dev/null 2>&1; then
    148   echo "A copy of VirtualBox is currently running.  Please close it and try again. Please note"
    149   echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
    150   echo "finish running."
    151   exit 1
     147VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
     148if [ -n "$VBOXSVC_PID" ]; then
     149  # try graceful termination; terminate the webservice first
     150  /etc/init.d/vboxweb-service stop || true
     151  kill -USR1 $VBOXSVC_PID
     152  sleep 1
     153  if pidof VBoxSVC > /dev/null 2>&1; then
     154    echo "A copy of VirtualBox is currently running.  Please close it and try again. Please note"
     155    echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
     156    echo "finish running."
     157    exit 1
     158  fi
    152159fi
    153160
     
    305312%preun
    306313# check for active VMs
    307 if pidof VBoxSVC > /dev/null 2>&1; then
    308   echo "A copy of VirtualBox is currently running.  Please close it and try again. Please note"
    309   echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
    310   echo "finish running."
    311   exit 1
     314VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
     315if [ -n "$VBOXSVC_PID" ]; then
     316  # try graceful termination; terminate the webservice first
     317  /etc/init.d/vboxweb-service stop || true
     318  sleep 1
     319  if pidof VBoxSVC > /dev/null 2>&1; then
     320    echo "A copy of VirtualBox is currently running.  Please close it and try again. Please note"
     321    echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
     322    echo "finish running."
     323    exit 1
     324  fi
    312325fi
    313326
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette