VirtualBox

Changeset 47315 in vbox


Ignore:
Timestamp:
Jul 22, 2013 4:20:04 PM (12 years ago)
Author:
vboxsync
Message:

Solaris/Installer: Wait until all services have been imported before starting/restarting them.

File:
1 edited

Legend:

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

    r44528 r47315  
    11041104                subprint "Skipped for targetted installs."
    11051105            else
     1106                # Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can
     1107                # take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in
     1108                # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds.
     1109                $BIN_SVCADM restart svc:system/manifest-import:default
     1110                cmax=32
     1111                success=0
     1112                $BIN_SVCS virtualbox/zoneaccess >/dev/null 2>&1
     1113                while test "$?" -ne 0;
     1114                do
     1115                    sleep 1
     1116                    cslept=`expr $cslept + 1`
     1117                    if test "$cslept" -eq "$cmax"; then
     1118                        success=1
     1119                        break
     1120                    fi
     1121                    $BIN_SVCS virtualbox/zoneaccess >/dev/null 2>&1
     1122                done
     1123
    11061124                # Start ZoneAccess service, other services are disabled by default.
    1107                 $BIN_SVCADM restart svc:system/manifest-import:default
    1108                 start_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default" \
     1125                if test "$success" -eq 0; then
     1126                    start_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default" \
    11091127                                "/var/svc/log/application-virtualbox-zoneaccess:default.log"
    1110             fi
     1128                else
     1129                    echo "## Service import failed."
     1130                    echo "## See /var/svc/log/system-manifest-import:default.log for details."
     1131                fi
     1132            fi
    11111133        fi
    11121134
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