VirtualBox

Changeset 32326 in vbox for trunk


Ignore:
Timestamp:
Sep 8, 2010 3:58:41 PM (14 years ago)
Author:
vboxsync
Message:

Linux .run installer: try to terminate VBoxSVC if necessary; check for running VBoxSVC instances before uninstalling; handle the vboxweb-service

Location:
trunk/src/VBox/Installer/linux
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/install.sh

    r32183 r32326  
    113113info "VirtualBox Version $VERSION r$SVNREV ($BUILD) installer"
    114114
    115 check_root      # Make sure that we were invoked as root...
    116 check_running   # ... and that no copy of VirtualBox was running at the time.
     115
     116# Make sure that we were invoked as root...
     117check_root
    117118
    118119# Set up logging before anything else
    119120create_log $LOG
     121
     122# Now stop the web service otherwise it will keep VBoxSVC running
     123stop_init_script vboxweb-service
     124
     125# Now check if no VBoxSVC daemon is running
     126check_running
     127
    120128log "VirtualBox $VERSION r$SVNREV installer, built $BUILD."
    121129log ""
     
    453461            RC_SCRIPT=1
    454462        fi
     463        start_init_script vboxweb-service
    455464        log ""
    456465        log "End of the output from the Linux kernel build system."
  • trunk/src/VBox/Installer/linux/routines.sh

    r31664 r32326  
    9696
    9797check_running() {
    98     if pidof VBoxSVC > /dev/null 2>&1; then
    99         echo 1>&2 "A copy of VirtualBox is currently running.  Please close it and try again."
    100         abort "Please note that it can take up to ten seconds for VirtualBox to finish running."
     98    VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null`
     99    if [ -n "$VBOXSVC_PID" ]; then
     100        kill -USR1 $VBOXSVC_PID
     101        sleep 1
     102        if pidof VBoxSVC > /dev/null 2>&1; then
     103            echo 1>&2 "A copy of VirtualBox is currently running.  Please close it and try again."
     104            abort "Please note that it can take up to ten seconds for VirtualBox to finish running."
     105        fi
    101106    fi
    102107}
  • trunk/src/VBox/Installer/linux/uninstall.sh

    r32183 r32326  
    2828fi
    2929
     30check_root
     31
    3032[ -z "$DKMS"       ]    && DKMS=`which dkms 2> /dev/null`
    3133[ -z "$CONFIG_DIR" ]    && CONFIG_DIR="/etc/vbox"
     
    3335[ -z "$CONFIG_FILES" ]  && CONFIG_FILES="filelist"
    3436[ -z "$DEFAULT_FILES" ] && DEFAULT_FILES=`pwd`/deffiles
    35 
    36 # Terminate Server and VBoxNetDHCP if running
    37 terminate_proc VBoxSVC
    38 terminate_proc VBoxNetDHCP
    3937
    4038# Find previous installation
     
    5250# Stop the web service
    5351stop_init_script vboxweb-service
     52# Do this check here after we terminated the web service
     53check_running
     54# Terminate VBoxNetDHCP if running
     55terminate_proc VBoxNetDHCP
    5456delrunlevel vboxweb-service > /dev/null 2>&1
    5557remove_init_script vboxweb-service
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