ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / sysutils / virtualbox / patches / 09-SMF-shell-scripts.patch
blob990833b475cc6127563e3400c290ee1b026d958d
1 --- VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxballoonctrl.sh.orig
2 +++ VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxballoonctrl.sh
3 @@ -33,15 +33,17 @@
4 VW_OPT="$1"
5 VW_EXIT=0
7 +VBOXBALLOONCTRL=/opt/VirtualBox/64/VBoxBalloonCtrl
9 case $VW_OPT in
10 start)
11 - if [ ! -f /opt/VirtualBox/VBoxBalloonCtrl ]; then
12 - echo "ERROR: /opt/VirtualBox/VBoxBalloonCtrl does not exist."
13 + if [ ! -f $VBOXBALLOONCTRL ]; then
14 + echo "ERROR: $VBOXBALLOONCTRL does not exist."
15 return $SMF_EXIT_ERR_CONFIG
18 - if [ ! -x /opt/VirtualBox/VBoxBalloonCtrl ]; then
19 - echo "ERROR: /opt/VirtualBox/VBoxBalloonCtrl is not executable."
20 + if [ ! -x $VBOXBALLOONCTRL ]; then
21 + echo "ERROR: $VBOXBALLOONCTRL is not executable."
22 return $SMF_EXIT_ERR_CONFIG
25 @@ -101,7 +103,7 @@
26 [ -n "$VBOXWATCHDOG_LOGSIZE" ] && PARAMS="$PARAMS -S \"$VBOXWATCHDOG_LOGSIZE\""
27 [ -n "$VBOXWATCHDOG_LOGINTERVAL" ] && PARAMS="$PARAMS -I \"$VBOXWATCHDOG_LOGINTERVAL\""
29 - exec su - "$VBOXWATCHDOG_USER" -c "/opt/VirtualBox/VBoxBalloonCtrl $PARAMS"
30 + exec su - "$VBOXWATCHDOG_USER" -c "$VBOXBALLOONCTRL $PARAMS"
32 VW_EXIT=$?
33 if [ $VW_EXIT != 0 ]; then
34 --- VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxautostart.sh.orig
35 +++ VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxautostart.sh
36 @@ -33,15 +33,17 @@
37 VW_OPT="$1"
38 VW_EXIT=0
40 +VBOXAUTOSTART=/opt/VirtualBox/64/VBoxAutostart
42 case $VW_OPT in
43 start)
44 - if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then
45 - echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."
46 + if [ ! -f $VBOXAUTOSTART ]; then
47 + echo "ERROR: $VBOXAUTOSTART does not exist."
48 return $SMF_EXIT_ERR_CONFIG
51 - if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then
52 - echo "ERROR: /opt/VirtualBox/VBoxAutostart is not exectuable."
53 + if [ ! -x $VBOXAUTOSTART ]; then
54 + echo "ERROR: $VBOXAUTOSTART is not exectuable."
55 return $SMF_EXIT_ERR_CONFIG
58 @@ -67,7 +69,7 @@
59 # Get all users
60 for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1`
62 - su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
63 + su - "$VW_USER" -c "$VBOXAUTOSTART --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
65 VW_EXIT=$?
66 if [ $VW_EXIT != 0 ]; then
67 @@ -78,13 +80,13 @@
68 done
70 stop)
71 - if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then
72 - echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."
73 + if [ ! -f $VBOXAUTOSTART ]; then
74 + echo "ERROR: $VBOXAUTOSTART does not exist."
75 return $SMF_EXIT_ERR_CONFIG
78 - if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then
79 - echo "ERROR: /opt/VirtualBox/VBoxAutostart is not executable."
80 + if [ ! -x $VBOXAUTOSTART ]; then
81 + echo "ERROR: $VBOXAUTOSTART is not executable."
82 return $SMF_EXIT_ERR_CONFIG
85 @@ -110,7 +112,7 @@
86 # Get all users
87 for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1`
89 - su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
90 + su - "$VW_USER" -c "$VBOXAUTOSTART --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
92 VW_EXIT=$?
93 if [ $VW_EXIT != 0 ]; then
94 --- VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxwebsrv.sh.orig
95 +++ VirtualBox-7.0.18/src/VBox/Installer/solaris/smf-vboxwebsrv.sh
96 @@ -33,15 +33,17 @@
97 VW_OPT="$1"
98 VW_EXIT=0
100 +VBOXROOT=/opt/VirtualBox/64
102 case $VW_OPT in
103 start)
104 - if [ ! -f /opt/VirtualBox/vboxwebsrv ]; then
105 - echo "ERROR: /opt/VirtualBox/vboxwebsrv does not exist."
106 + if [ ! -f $VBOXROOT/vboxwebsrv ]; then
107 + echo "ERROR: $VBOXROOT/vboxwebsrv does not exist."
108 return $SMF_EXIT_ERR_CONFIG
111 - if [ ! -x /opt/VirtualBox/vboxwebsrv ]; then
112 - echo "ERROR: /opt/VirtualBox/vboxwebsrv is not executable."
113 + if [ ! -x $VBOXROOT/vboxwebsrv ]; then
114 + echo "ERROR: $VBOXROOT/vboxwebsrv is not executable."
115 return $SMF_EXIT_ERR_CONFIG
118 @@ -112,19 +114,19 @@
120 # Set authentication method + password hash
121 if [ -n "$VW_AUTH_LIBRARY" ]; then
122 - su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setproperty websrvauthlibrary \"$VW_AUTH_LIBRARY\""
123 + su - "$VW_USER" -c "$VBOXROOT/VBoxManage setproperty websrvauthlibrary \"$VW_AUTH_LIBRARY\""
124 if [ $? != 0 ]; then
125 echo "Error $? setting webservice authentication library to $VW_AUTH_LIBRARY"
128 if [ -n "$VW_AUTH_PWHASH" ]; then
129 - su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setextradata global \"VBoxAuthSimple/users/$VW_USER\" \"$VW_AUTH_PWHASH\""
130 + su - "$VW_USER" -c "$VBOXROOT/VBoxManage setextradata global \"VBoxAuthSimple/users/$VW_USER\" \"$VW_AUTH_PWHASH\""
131 if [ $? != 0 ]; then
132 echo "Error $? setting webservice password hash"
136 - exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
137 + exec su - "$VW_USER" -c "$VBOXROOT/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
139 VW_EXIT=$?
140 if [ $VW_EXIT != 0 ]; then