aboutsummaryrefslogtreecommitdiff
path: root/bhyve_test
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-10-20 20:22:10 +0000
committerrodri <rgl@antares-labs.eu>2021-10-20 20:22:10 +0000
commit0bef22e73c45f37eb1f9f91fccb58caf4956c910 (patch)
tree47d8bcde9877b25644127358f1e423194cbf485f /bhyve_test
parent0f6ff3b8ef4d0747112f1087d8cced7c9a16eb5f (diff)
downloadbhyve-rc.d-0bef22e73c45f37eb1f9f91fccb58caf4956c910.tar.gz
bhyve-rc.d-0bef22e73c45f37eb1f9f91fccb58caf4956c910.tar.bz2
bhyve-rc.d-0bef22e73c45f37eb1f9f91fccb58caf4956c910.zip
correct diagnostic output redirections.
re-organize the files to make more sense.
Diffstat (limited to 'bhyve_test')
-rwxr-xr-xbhyve_test57
1 files changed, 0 insertions, 57 deletions
diff --git a/bhyve_test b/bhyve_test
deleted file mode 100755
index a20cf0f..0000000
--- a/bhyve_test
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $AntaresLabs$
-#
-
-# PROVIDE: bhyve_test
-# REQUIRE: DAEMON FILESYSTEMS
-# KEYWORD: nojail shutdown
-
-. /etc/rc.subr
-
-vmname=test
-name="bhyve_${vmname}"
-desc="Bhyve - ${vmname} VM"
-rcvar="${name}_enable"
-start_cmd="bhyve_start"
-stop_cmd="bhyve_stop"
-status_cmd="bhyve_status"
-extra_commands="status"
-
-load_rc_config $name
-: ${bhyve_test_enable:=NO}
-
-runvm()
-{
- local rc=0
-
- while [ $rc -eq 0 ];do
- /vmm/machine/${vmname}/run
- rc=$?
- done
-}
-
-bhyve_start()
-{
- runvm &
-}
-
-bhyve_status()
-{
- local pid=$(ps axo pid,command | egrep "${vmname}.*\\(bhyve\\)" | awk '{print $1}')
-
- if [ ! -z $pid ];then
- echo $name is running with pid $pid. 2>&1
- return 0
- else
- echo $name is not running.
- fi
-}
-
-bhyve_stop()
-{
- local pid=$(ps axo pid,command | egrep "${vmname}.*\\(bhyve\\)" | awk '{print $1}')
- kill -TERM $pid
-}
-
-run_rc_command "$1"