?? rc.watchdog.redhat
字號:
#!/bin/sh## chkconfig: - 20 80# description: A software watchdog### rc file author: Marc Merlin <marcsoft@merlins.org># Henning P. Schmiedehausen <hps@tanstaafl.de># Fix by: K. Yamato <kyamato@miraclelinux.com># - Fix "${VERBOSE}="yes" line without no space characters.# - Default daemon status is set to off in all run levels.# - The following settings are moved to /etc/sysconf/watchdog# + choice of watchdog or wd_keepalive as a deamon# + verbose option# + modules loading and unloading commands### Note that even though chkconfig says that this should be run at runlevel 1,# RH by default won't do this, so the RPM applies an ugly patch to # /etc/rc.d/init.d/single so that if you go from RL 3 to RL 1, watchdog is# restarted anyway (if it's not, it can cause the kernel to reboot your machine# depending on whether your kernel was compiled with CONFIG_WATCHDOG_NOWAYOUT)## I have filed a bug with RH about this, and I hope they will change their# single script to allow for other scripts to be run in RL 1.# Source function library.. /etc/rc.d/init.d/functionsVERBOSE="no"WD_DAEMON=/usr/sbin/watchdogif [ -f /etc/sysconfig/watchdog ]; then . /etc/sysconfig/watchdogfi[ -x ${WD_DAEMON} -a -e /etc/watchdog.conf ] || exit 0# See how we were called.case "$1" in start) echo -n "Starting watchdog daemon: " # Load modules if [ "x${START_MOD_CMD}" != "x" ]; then ${START_MOD_CMD} fi if [ "${VERBOSE}" = "yes" ]; then daemon ${WD_DAEMON} -v else daemon ${WD_DAEMON} fi echo touch /var/lock/subsys/watchdog ;; stop) echo -n "Stopping watchdog daemon: " killproc ${WD_DAEMON} # Unload modules if [ "x${STOP_MOD_CMD}" != "x" ]; then ${STOP_MOD_CMD} fi rm -f /var/lock/subsys/watchdog ;; status) status ${WD_DAEMON} ;; restart|reload) /etc/rc.d/init.d/watchdog stop /etc/rc.d/init.d/watchdog start ;; *) echo "Usage: watchdog {start|stop|status|restart|reload}" exit 1 ;;esacexit 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -