vbox的更動 50295 路徑 trunk/src/VBox/Installer/solaris
- 時間撮記:
- 2014-1-30 下午07:31:51 (11 年 以前)
- 位置:
- trunk/src/VBox/Installer/solaris
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Installer/solaris/smf-vboxautostart.sh
r43656 r50295 2 2 # $Id$ 3 3 4 # Copyright (C) 2012 Oracle Corporation4 # Copyright (C) 2012-2014 Oracle Corporation 5 5 # 6 6 # This file is part of VirtualBox Open Source Edition (OSE), as … … 25 25 case $VW_OPT in 26 26 start) 27 if [ ! - x/opt/VirtualBox/VBoxAutostart ]; then27 if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then 28 28 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." 29 29 return $SMF_EXIT_ERR_CONFIG 30 30 fi 31 31 32 if [ ! - f/opt/VirtualBox/VBoxAutostart ]; then33 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."32 if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then 33 echo "ERROR: /opt/VirtualBox/VBoxAutostart is not exectuable." 34 34 return $SMF_EXIT_ERR_CONFIG 35 35 fi … … 44 44 VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` 45 45 [ $? != 0 ] && VW_LOGINTERVAL= 46 VW_VBOXGROUP=`/usr/bin/svcprop -p config/vboxgroup $SMF_FMRI 2>/dev/null` 47 [ $? != 0 ] && VW_VBOXGROUP= 46 48 47 49 # Provide sensible defaults … … 50 52 [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 51 53 [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 54 [ -z "$VW_VBOXGROUP" ] && VW_VBOXGROUP=staff 52 55 53 56 # Get all users 54 for VW_USER in `logins -g staff`57 for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1` 55 58 do 56 execsu - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""59 su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" 57 60 58 61 VW_EXIT=$? … … 65 68 ;; 66 69 stop) 67 if [ ! - x/opt/VirtualBox/VBoxAutostart ]; then70 if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then 68 71 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." 69 72 return $SMF_EXIT_ERR_CONFIG 70 73 fi 71 74 72 if [ ! - f/opt/VirtualBox/VBoxAutostart ]; then73 echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."75 if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then 76 echo "ERROR: /opt/VirtualBox/VBoxAutostart is not executable." 74 77 return $SMF_EXIT_ERR_CONFIG 75 78 fi … … 84 87 VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` 85 88 [ $? != 0 ] && VW_LOGINTERVAL= 89 VW_VBOXGROUP=`/usr/bin/svcprop -p config/vboxgroup $SMF_FMRI 2>/dev/null` 90 [ $? != 0 ] && VW_VBOXGROUP= 86 91 87 92 # Provide sensible defaults … … 90 95 [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 91 96 [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 97 [ -z "$VW_VBOXGROUP" ] && VW_VBOXGROUP=staff 92 98 93 99 # Get all users 94 for VW_USER in `logins -g staff`100 for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1` 95 101 do 96 execsu - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""102 su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" 97 103 98 104 VW_EXIT=$? -
trunk/src/VBox/Installer/solaris/virtualbox-autostart.xml
r43951 r50295 94 94 <property_group name='config' type='application'> 95 95 <propval name='config' type='astring' value='/etc/vbox/autostart.cfg' /> 96 <propval name='vboxgroup' type='astring' value='staff' /> 96 97 </property_group> 97 98
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器