Changeset 43656 in vbox for trunk/src/VBox/Installer/solaris
- Timestamp:
- Oct 16, 2012 3:18:28 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 81422
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/smf-vboxautostart.sh
r42491 r43656 65 65 ;; 66 66 stop) 67 # Kill service contract 68 smf_kill_contract $2 TERM 1 67 if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then 68 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." 69 return $SMF_EXIT_ERR_CONFIG 70 fi 71 72 if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then 73 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." 74 return $SMF_EXIT_ERR_CONFIG 75 fi 76 77 # Get svc configuration 78 VW_CONFIG=`/usr/bin/svcprop -p config/config $SMF_FMRI 2>/dev/null` 79 [ $? != 0 ] && VW_CONFIG= 80 VW_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null` 81 [ $? != 0 ] && VW_ROTATE= 82 VW_LOGSIZE=`/usr/bin/svcprop -p config/logsize $SMF_FMRI 2>/dev/null` 83 [ $? != 0 ] && VW_LOGSIZE= 84 VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` 85 [ $? != 0 ] && VW_LOGINTERVAL= 86 87 # Provide sensible defaults 88 [ -z "$VW_CONFIG" ] && VW_CONFIG=/etc/vbox/autostart.cfg 89 [ -z "$VW_ROTATE" ] && VW_ROTATE=10 90 [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 91 [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 92 93 # Get all users 94 for VW_USER in `logins -g staff` 95 do 96 exec su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" 97 98 VW_EXIT=$? 99 if [ $VW_EXIT != 0 ]; then 100 echo "VBoxAutostart failed with $VW_EXIT." 101 VW_EXIT=1 102 break 103 fi 104 done 69 105 ;; 70 106 *) -
trunk/src/VBox/Installer/solaris/virtualbox-autostart.xml
r43653 r43656 71 71 type='method' 72 72 name='stop' 73 exec=' :kill'74 timeout_seconds=' 15'>73 exec='/opt/VirtualBox/smf-vboxautostart.sh %m' 74 timeout_seconds='0'> 75 75 <method_context> 76 76 <method_credential user='root' group='root' />
Note:
See TracChangeset
for help on using the changeset viewer.