1#!/bin/sh 2# 3# PROVIDE: xendriverdomain 4# REQUIRE: DAEMON 5# 6# Should be run in a driver domain, but not in domain 0. 7 8. /etc/rc.subr 9 10DIR=$(dirname "$0") 11. "${DIR}/xen-hotplugpath.sh" 12 13LD_LIBRARY_PATH="${libdir}" 14export LD_LIBRARY_PATH 15 16name="xendriverdomain" 17start_precmd="xendriverdomain_precmd" 18start_cmd="xendriverdomain_startcmd" 19stop_cmd="xendriverdomain_stop" 20extra_commands="" 21 22XLDEVD_PIDFILE="@XEN_RUN_DIR@/xldevd.pid" 23 24xendriverdomain_precmd() 25{ 26 : 27} 28 29xendriverdomain_startcmd() 30{ 31 printf "Starting xenservices: xl devd." 32 33 ${sbindir}/xl devd --pidfile=$XLDEVD_PIDFILE ${XLDEVD_ARGS} 34 35 printf "\n" 36} 37 38xendriverdomain_stop() 39{ 40 printf "Stopping xl devd.\n" 41 42 rc_pid=$(check_pidfile ${XLDEVD_PIDFILE} ${sbindir}/xl) 43 44 kill -${sig_stop:-TERM} $rc_pids 45 wait_for_pids $rc_pids 46} 47 48load_rc_config $name 49run_rc_command "$1" 50