diff options
author | jkim <jkim@FreeBSD.org> | 2015-02-17 15:07:01 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2015-02-17 15:07:01 +0800 |
commit | 76a21cd95402d9ea92ae5a165a10ff6ad2195b36 (patch) | |
tree | d559a7b9f9b0bb06c3df354c9ff22c14ec30ce4b /emulators/virtualbox-ose | |
parent | 83f89c3082bbc7c640ca87d5c9e589a71d249f1c (diff) | |
download | freebsd-ports-gnome-76a21cd95402d9ea92ae5a165a10ff6ad2195b36.tar.gz freebsd-ports-gnome-76a21cd95402d9ea92ae5a165a10ff6ad2195b36.tar.zst freebsd-ports-gnome-76a21cd95402d9ea92ae5a165a10ff6ad2195b36.zip |
Let rc(8) scripts directly execute binaries. This makes them stop properly.
Submitted by: vvd@unislabs.com (initial patch)
Diffstat (limited to 'emulators/virtualbox-ose')
-rw-r--r-- | emulators/virtualbox-ose/Makefile | 5 | ||||
-rw-r--r-- | emulators/virtualbox-ose/files/vboxheadless.in | 10 | ||||
-rw-r--r-- | emulators/virtualbox-ose/files/vboxwatchdog.in | 4 | ||||
-rw-r--r-- | emulators/virtualbox-ose/files/vboxwebsrv.in | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index 5a7940d6ecc4..8348e2cba8bf 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -3,7 +3,7 @@ PORTNAME= virtualbox-ose DISTVERSION= 4.3.22 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ @@ -105,7 +105,8 @@ PLIST_SUB+= GUEST_VER=${VBOX_GUEST_VER} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERU=${PYTHON_VER:S/./_/} \ VBOXGROUP=${VBOXGROUP} -SUB_LIST+= VBOXGROUP=${VBOXGROUP} \ +SUB_LIST+= VBOXDIR=${VBOX_DIR} \ + VBOXGROUP=${VBOXGROUP} \ VBOXUSER=${VBOXUSER} \ VBOXWSUSER=${VBOXWSUSER} USE_RC_SUBR+= vboxheadless vboxwatchdog diff --git a/emulators/virtualbox-ose/files/vboxheadless.in b/emulators/virtualbox-ose/files/vboxheadless.in index c952889943a6..6d01a50f7db2 100644 --- a/emulators/virtualbox-ose/files/vboxheadless.in +++ b/emulators/virtualbox-ose/files/vboxheadless.in @@ -28,7 +28,7 @@ name="vboxheadless" rcvar=vboxheadless_enable -command="%%PREFIX%%/bin/VBoxHeadless" +command="%%VBOXDIR%%/VBoxHeadless" pidbase="/var/run/${name}" start_cmd="${name}_start" @@ -52,7 +52,7 @@ vboxheadless_start() /usr/bin/printf "%25s " "${vmname}" - /usr/bin/su ${vmuser} -c "%%PREFIX%%/bin/VBoxManage showvminfo '${vmname}' >/dev/null" 2>/dev/null + /usr/bin/su ${vmuser} -c "%%VBOXDIR%%/VBoxManage showvminfo '${vmname}' >/dev/null" 2>/dev/null if [ $? != 0 ]; then echo "Unknown machine" @@ -65,7 +65,7 @@ vboxheadless_start() fi /bin/sleep ${vmdelay} - /usr/bin/install -o ${vmuser} -g wheel -m 644 /dev/null ${mpidfile} + /usr/bin/install -o ${vmuser} -g %%VBOXGROUP%% -m 644 /dev/null ${mpidfile} /usr/sbin/daemon -f -p ${mpidfile} -u ${vmuser} ${command} --startvm "${vmname}" ${vmflags} echo "Started" done @@ -88,7 +88,7 @@ vboxheadless_stop() if [ -n "${pid}" ]; then /bin/sleep ${vmdelay} - /usr/bin/su ${vmuser} -c "%%PREFIX%%/bin/VBoxManage controlvm '${vmname}' ${vmstop} >/dev/null" 2>/dev/null + /usr/bin/su ${vmuser} -c "%%VBOXDIR%%/VBoxManage controlvm '${vmname}' ${vmstop} >/dev/null" 2>/dev/null wait_for_pids $pid >/dev/null echo "Stopped" else @@ -110,7 +110,7 @@ vboxheadless_status() eval vmname="\${vboxheadless_${machine}_name:-${machine}}" eval vmuser="\${vboxheadless_${machine}_user:-${vboxheadless_user}}" - /usr/bin/su ${vmuser} -c "%%PREFIX%%/bin/VBoxManage showvminfo '${vmname}' >/dev/null" 2>/dev/null + /usr/bin/su ${vmuser} -c "%%VBOXDIR%%/VBoxManage showvminfo '${vmname}' >/dev/null" 2>/dev/null if [ $? != 0 ]; then /usr/bin/printf "%20s %s\n" "${vmname}" "Unknown Machine" diff --git a/emulators/virtualbox-ose/files/vboxwatchdog.in b/emulators/virtualbox-ose/files/vboxwatchdog.in index 13fabab8cc3e..28af2913d92a 100644 --- a/emulators/virtualbox-ose/files/vboxwatchdog.in +++ b/emulators/virtualbox-ose/files/vboxwatchdog.in @@ -18,7 +18,7 @@ name=vboxwatchdog rcvar=vboxwatchdog_enable -command="%%PREFIX%%/bin/VBoxBalloonCtrl" +command="%%VBOXDIR%%/VBoxBalloonCtrl" pidfile="/var/run/${name}.pid" start_cmd="${name}_start" @@ -39,7 +39,7 @@ vboxwatchdog_start() unset VBOX_RELEASE_LOG_DEST echo -n "Starting ${name}" - /usr/bin/install -o ${vboxwatchdog_user} -g wheel -m 644 /dev/null ${pidfile} + /usr/bin/install -o ${vboxwatchdog_user} -g %%VBOXGROUP%% -m 644 /dev/null ${pidfile} /usr/sbin/daemon -f -p ${pidfile} -u ${vboxwatchdog_user} ${command} ${vboxwatchdog_flags} echo '.' } diff --git a/emulators/virtualbox-ose/files/vboxwebsrv.in b/emulators/virtualbox-ose/files/vboxwebsrv.in index 76548ed3aa47..a421324e5965 100644 --- a/emulators/virtualbox-ose/files/vboxwebsrv.in +++ b/emulators/virtualbox-ose/files/vboxwebsrv.in @@ -18,7 +18,7 @@ name=vboxwebsrv rcvar=vboxwebsrv_enable -command="%%PREFIX%%/bin/vboxwebsrv" +command="%%VBOXDIR%%/vboxwebsrv" pidfile="/var/run/${name}.pid" start_cmd="${name}_start" |