VirtualBox

Changeset 37166 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
May 20, 2011 2:19:30 PM (14 years ago)
Author:
vboxsync
Message:

Solaris/installer: minor cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/vboxconfig.sh

    r36687 r37166  
    662662
    663663
     664# stop_service(servicename, shortFMRI-suitable for grep, full FMRI)
     665# failure: non fatal
     666stop_service()
     667{
     668    if test -z "$1" || test -z "$2" || test -z "$3"; then
     669        errorprint "missing argument to stop_service()"
     670        exit 1
     671    fi
     672    servicefound=`$BIN_SVCS -a | grep "$2" 2>/dev/null`
     673    if test ! -z "$servicefound"; then
     674        $BIN_SVCADM disable -s $3
     675        # Don't delete the manifest, this is handled by the manifest class action
     676        # $BIN_SVCCFG delete $3
     677        if test "$?" -eq 0; then
     678            subprint "Unloaded: $1"
     679        else
     680            subprint "Unloading: $1  ...ERROR(S)."
     681        fi
     682    fi
     683}
     684
     685
    664686# cleanup_install([fatal])
    665687# failure: depends on [fatal]
     
    673695    fi
    674696
    675     # stop webservice
    676     servicefound=`$BIN_SVCS -a | grep "virtualbox/webservice" 2>/dev/null`
    677     if test ! -z "$servicefound"; then
    678         $BIN_SVCADM disable -s svc:/application/virtualbox/webservice:default
    679         # Don't delete the manifest, this is handled by the manifest class action
    680         # $BIN_SVCCFG delete svc:/application/virtualbox/webservice:default
    681         if test "$?" -eq 0; then
    682             subprint "Unloaded: Web service"
    683         else
    684             subprint "Unloading: Web service  ...ERROR(S)."
    685         fi
    686     fi
    687 
    688     # stop balloonctrl
    689     servicefound=`$BIN_SVCS -a | grep "virtualbox/balloonctrl" 2>/dev/null`
    690     if test ! -z "$servicefound"; then
    691         $BIN_SVCADM disable -s svc:/application/virtualbox/balloonctrl:default
    692         # Don't delete the manifest, this is handled by the manifest class action
    693         # $BIN_SVCCFG delete svc:/application/virtualbox/balloonctrl:default
    694         if test "$?" -eq 0; then
    695             subprint "Unloaded: Balloon control service"
    696         else
    697             subprint "Unloading: Balloon control service  ...ERROR(S)."
    698         fi
    699     fi
    700 
    701 
    702     # stop zoneaccess service
    703     servicefound=`$BIN_SVCS -a | grep "virtualbox/zoneaccess" 2>/dev/null`
    704     if test ! -z "$servicefound"; then
    705         $BIN_SVCADM disable -s svc:/application/virtualbox/zoneaccess:default
    706         # Don't delete the manifest, this is handled by the manifest class action
    707         # $BIN_SVCCFG delete svc:/application/virtualbox/zoneaccess
    708         if test "$?" -eq 0; then
    709             subprint "Unloaded: Zone access service"
    710         else
    711             subprint "Unloading: Zone access service  ...ERROR(S)."
    712         fi
    713     fi
     697    # stop the services
     698    stop_service "Web service" "virtualbox/webservice" "svc:/application/virtualbox/webservice:default"
     699    stop_service "Balloon control service" "virtualbox/balloonctrl" "svc:/application/virtualbox/balloonctrl:default"
     700    stop_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default"
    714701
    715702    # unplumb all vboxnet instances for non-remote installs
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