xend
来自「xen 3.2.2 源码」· 代码 · 共 67 行
TXT
67 行
#!/bin/bash## xend Script to start and stop the Xen control daemon.## Author: Keir Fraser <keir.fraser@cl.cam.ac.uk>## chkconfig: 2345 98 01# description: Starts and stops the Xen control daemon.### BEGIN INIT INFO# Provides: xend# Required-Start: $syslog $remote_fs# Should-Start:# Required-Stop: $syslog $remote_fs# Should-Stop:# Default-Start: 3 4 5# Default-Stop: 0 1 2 6# Default-Enabled: yes# Short-Description: Start/stop xend# Description: Starts and stops the Xen control daemon.### END INIT INFOif ! grep -q "control_d" /proc/xen/capabilities ; then exit 0fi# Wait for Xend to be upfunction await_daemons_up{ i=1 rets=10 xend status while [ $? -ne 0 -a $i -lt $rets ]; do sleep 1 echo -n . i=$(($i + 1)) xend status done}case "$1" in start) xend start await_daemons_up ;; stop) xend stop ;; status) xend status ;; reload) xend reload ;; restart|force-reload) xend restart await_daemons_up ;; *) # do not advertise unreasonable commands that there is no reason # to use with this device echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}" exit 1esacexit $?
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?