Author: arekm Date: Sun Mar 26 12:32:11 2006 GMT Module: SOURCES Tag: HEAD ---- Log message: - new
---- Files affected: SOURCES: hdapsd.init (NONE -> 1.1) (NEW), hdapsd.sysconfig (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SOURCES/hdapsd.init diff -u /dev/null SOURCES/hdapsd.init:1.1 --- /dev/null Sun Mar 26 14:32:11 2006 +++ SOURCES/hdapsd.init Sun Mar 26 14:32:06 2006 @@ -0,0 +1,67 @@ +#!/bin/sh +# +# hdapsd Starts the hdapsd daemon +# +# chkconfig: 345 44 56 +# description: protect harddriver +# processname: hdapsd +# + +# Source function library. +. /etc/rc.d/init.d/functions + +HDAPS_DEVICE="/dev/hda" + +# Configuration file. +[ -f /etc/sysconfig/hdapsd ] && . /etc/sysconfig/hdapsd + + +RETVAL=0 +# See how we were called. +case "$1" in + start) + # Start daemons. + if [ ! -f /var/lock/subsys/hdapsd ]; then + msg_starting hdapsd + daemon hdapsd -b ${HDAPS_DEVICE} ${HDAPS_OPTIONS} + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hdapsd + else + msg_already_running hdapsd + fi + ;; + stop) + # Stop daemons. + if [ -f /var/lock/subsys/hdapsd ]; then + msg_stopping hdapsd + killproc hdapsd + rm -f /var/lock/subsys/hdapsd >/dev/null 2>&1 + else + msg_not_running hdapsd + fi + ;; + reload|force-reload) + if [ -f /var/lock/subsys/hdapsd ]; then + msg_reloading hdapsd + killproc hdapsd -HUP + RETVAL=$? + else + msg_not_running hdapsd >&2 + exit 7 + fi + ;; + restart) + $0 stop + $0 start + exit $? + ;; + status) + status hdapsd + exit $? + ;; + *) + msg_usage "$0 {start|stop|restart|reload|force-reload|status}" + exit 3 +esac + +exit $RETVAL ================================================================ Index: SOURCES/hdapsd.sysconfig diff -u /dev/null SOURCES/hdapsd.sysconfig:1.1 --- /dev/null Sun Mar 26 14:32:11 2006 +++ SOURCES/hdapsd.sysconfig Sun Mar 26 14:32:06 2006 @@ -0,0 +1,2 @@ +HDAPS_DEVICE="/dev/hda" +HDAPS_OPTIONS="" ================================================================ _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit