mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-29 23:34:36 +00:00
The daemons allow proper shutdown of a VM, heartbeats, inquiring and setting the network configuratio etc etc. They are only started with running in a Hyper-V VM Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
32 lines
714 B
Plaintext
Executable File
32 lines
714 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
HV_DAEMON=hv_kvp_daemon
|
|
|
|
start()
|
|
{
|
|
[ ! -d /sys/bus/vmbus ] && exit 0
|
|
|
|
ebegin "Starting Hyper-V Daemon: ${HV_DAEMON}"
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/${HV_DAEMON}.pid
|
|
|
|
start-stop-daemon --start --quiet \
|
|
--background \
|
|
--exec /sbin/${HV_DAEMON} \
|
|
--make-pidfile --pidfile ${PIDFILE} \
|
|
--
|
|
eend 0
|
|
}
|
|
|
|
stop()
|
|
{
|
|
[ ! -d /sys/bus/vmbus ] && exit 0
|
|
|
|
ebegin "Stopping Hyper-V Daemon: ${HV_DAEMON}"
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/${HV_DAEMON}.pid
|
|
|
|
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
|
|
|
eend $? "Failed to stop ${HV_DAEMON}"
|
|
} |