VirtualBox

Changeset 42491 in vbox


Ignore:
Timestamp:
Aug 1, 2012 7:09:11 AM (12 years ago)
Author:
vboxsync
Message:

Autostart: Support for Solaris

Location:
trunk/src/VBox
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/Makefile.kmk

    r42321 r42491  
    159159        $(VBOX_PATH_SOL_INST_SRC)/pkginstall.sh \
    160160        $(VBOX_PATH_SOL_INST_SRC)/smf-vboxballoonctrl.sh \
     161        $(VBOX_PATH_SOL_INST_SRC)/smf-vboxautostart.sh \
    161162        $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh,)
    162163
     
    307308        $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
    308309        smf-vboxballoonctrl.sh \
     310        smf-vboxautostart.sh \
    309311        $(if $(VBOX_WITH_WEBSERVICES),smf-vboxwebsrv.sh,)
    310312
     
    398400        $(if $(VBOX_WITH_HEADLESS),VBoxHeadless) \
    399401        VBoxBalloonCtrl \
     402        VBoxAutostart \
    400403        $(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \
    401404        $(if $(VBOX_WITH_WEBSERVICES),webtest)
     
    624627        $(QUIET)$(if $(VBOX_WITH_WEBSERVICES),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-webservice.xml         $(SOLARIS_VBOXSMF_DIR)/virtualbox-webservice.xml,)
    625628        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-balloonctrl.xml                                      $(SOLARIS_VBOXSMF_DIR)/virtualbox-balloonctrl.xml
     629        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-autostart.xml                                        $(SOLARIS_VBOXSMF_DIR)/virtualbox-autostart.xml
    626630        $(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh            $(SOLARIS_VBOXINST_DIR)/vnic_setup.sh,)
    627631        $(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicterm_solaris.sh            $(SOLARIS_VBOXINST_DIR)/vnic_term.sh,)
  • trunk/src/VBox/Installer/solaris/VBox.sh

    r37255 r42491  
    3838        exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
    3939        ;;
     40    VBoxAutostart|vboxautostart)
     41        exec "$INSTALL_DIR/VBoxAutostart" "$@"
     42        ;;
    4043    vboxwebsrv)
    4144        exec "$INSTALL_DIR/vboxwebsrv" "$@"
  • trunk/src/VBox/Installer/solaris/checkinstall.sh

    r40757 r42491  
    141141fi
    142142
     143# Check if the autostart service is running, if so stop & remove it
     144servicefound=`svcs -H "svc:/application/virtualbox/autostart" 2> /dev/null | grep '^online'`
     145if test ! -z "$servicefound"; then
     146    infoprint "VirtualBox autostart service appears to still be running."
     147    infoprint "Halting & removing autostart service..."
     148    /usr/sbin/svcadm disable -s svc:/application/virtualbox/autostart
     149fi
     150
    143151# Check if VBoxSVC is currently running
    144152VBOXSVC_PID=`ps -eo pid,fname | grep VBoxSVC | grep -v grep | awk '{ print $1 }'`
  • trunk/src/VBox/Installer/solaris/makepackage.sh

    r38998 r42491  
    114114ln -f ./VBoxISAExec $VBOX_INSTALLED_DIR/VBoxSDL
    115115ln -f ./VBoxISAExec $VBOX_INSTALLED_DIR/VBoxBalloonCtrl
     116ln -f ./VBoxISAExec $VBOX_INSTALLED_DIR/VBoxAutostart
    116117ln -f ./VBoxISAExec $VBOX_INSTALLED_DIR/vboxwebsrv
    117118ln -f ./VBoxISAExec $VBOX_INSTALLED_DIR/webtest
  • trunk/src/VBox/Installer/solaris/vboxconfig.sh

    r41641 r42491  
    852852    stop_service "Web service" "virtualbox/webservice" "svc:/application/virtualbox/webservice:default"
    853853    stop_service "Balloon control service" "virtualbox/balloonctrl" "svc:/application/virtualbox/balloonctrl:default"
     854    stop_service "Autostart service" "virtualbox/autostart" "svc:/application/virtualbox/autostart:default"
    854855    stop_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default"
    855856
     
    992993        if     test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml" \
    993994            || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml" \
    994             || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-balloonctrl.xml"; then
     995            || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-balloonctrl.xml"\
     996            || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-autostart.xml"; then
    995997            infoprint "Configuring services..."
    996998            if test "$REMOTEINST" -eq 1; then
  • trunk/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp

    r42182 r42491  
    190190    rc = autostartModifyDb(true /* fAutostart */, true /* fAddVM */);
    191191    RTCritSectLeave(&this->CritSect);
     192#elif defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
     193    NOREF(pszVMId); /* Not needed */
     194    rc = VINF_SUCCESS;
     195#else
     196    NOREF(pszVMId);
     197    rc = VERR_NOT_SUPPORTED;
     198#endif
     199
     200    return rc;
     201}
     202
     203int AutostartDb::removeAutostartVM(const char *pszVMId)
     204{
     205    int rc = VINF_SUCCESS;
     206
     207#if defined(RT_OS_LINUX)
     208    NOREF(pszVMId); /* Not needed */
     209    RTCritSectEnter(&this->CritSect);
     210    rc = autostartModifyDb(true /* fAutostart */, false /* fAddVM */);
     211    RTCritSectLeave(&this->CritSect);
     212#elif defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
     213    NOREF(pszVMId); /* Not needed */
     214    rc = VINF_SUCCESS;
     215#else
     216    NOREF(pszVMId);
     217    rc = VERR_NOT_SUPPORTED;
     218#endif
     219
     220    return rc;
     221}
     222
     223int AutostartDb::addAutostopVM(const char *pszVMId)
     224{
     225    int rc = VINF_SUCCESS;
     226
     227#if defined(RT_OS_LINUX)
     228    NOREF(pszVMId); /* Not needed */
     229    RTCritSectEnter(&this->CritSect);
     230    rc = autostartModifyDb(false /* fAutostart */, true /* fAddVM */);
     231    RTCritSectLeave(&this->CritSect);
    192232#elif defined(RT_OS_DARWIN)
    193233    NOREF(pszVMId); /* Not needed */
     
    201241}
    202242
    203 int AutostartDb::removeAutostartVM(const char *pszVMId)
    204 {
    205     int rc = VINF_SUCCESS;
    206 
    207 #if defined(RT_OS_LINUX)
    208     NOREF(pszVMId); /* Not needed */
    209     RTCritSectEnter(&this->CritSect);
    210     rc = autostartModifyDb(true /* fAutostart */, false /* fAddVM */);
     243int AutostartDb::removeAutostopVM(const char *pszVMId)
     244{
     245    int rc = VINF_SUCCESS;
     246
     247#if defined(RT_OS_LINUX)
     248    NOREF(pszVMId); /* Not needed */
     249    RTCritSectEnter(&this->CritSect);
     250    rc = autostartModifyDb(false /* fAutostart */, false /* fAddVM */);
    211251    RTCritSectLeave(&this->CritSect);
    212252#elif defined(RT_OS_DARWIN)
     
    221261}
    222262
    223 int AutostartDb::addAutostopVM(const char *pszVMId)
    224 {
    225     int rc = VINF_SUCCESS;
    226 
    227 #if defined(RT_OS_LINUX)
    228     NOREF(pszVMId); /* Not needed */
    229     RTCritSectEnter(&this->CritSect);
    230     rc = autostartModifyDb(false /* fAutostart */, true /* fAddVM */);
    231     RTCritSectLeave(&this->CritSect);
    232 #elif defined(RT_OS_DARWIN)
    233     NOREF(pszVMId); /* Not needed */
    234     rc = VINF_SUCCESS;
    235 #else
    236     NOREF(pszVMId);
    237     rc = VERR_NOT_SUPPORTED;
    238 #endif
    239 
    240     return rc;
    241 }
    242 
    243 int AutostartDb::removeAutostopVM(const char *pszVMId)
    244 {
    245     int rc = VINF_SUCCESS;
    246 
    247 #if defined(RT_OS_LINUX)
    248     NOREF(pszVMId); /* Not needed */
    249     RTCritSectEnter(&this->CritSect);
    250     rc = autostartModifyDb(false /* fAutostart */, false /* fAddVM */);
    251     RTCritSectLeave(&this->CritSect);
    252 #elif defined(RT_OS_DARWIN)
    253     NOREF(pszVMId); /* Not needed */
    254     rc = VINF_SUCCESS;
    255 #else
    256     NOREF(pszVMId);
    257     rc = VERR_NOT_SUPPORTED;
    258 #endif
    259 
    260     return rc;
    261 }
    262 
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