8139e2
#!/bin/sh
8139e2
#
8139e2
# quota_nld     Disk quota netlink message daemon
8139e2
#
8139e2
# chkconfig:   - 25 75
8139e2
# description:  quota_nld is a deamon that listens on netlink socket and \
8139e2
#               passes disk quota warnings produced by kernel to system \
8139e2
#               D-Bus or terminal user has last accessed.
8139e2
8139e2
### BEGIN INIT INFO
8139e2
# Provides: quota_nld 
8139e2
# Required-Start: $local_fs
8139e2
# Should-Start: $syslog messagebus 
8139e2
# Should-Stop: $syslog messagebus
8139e2
# Short-Description: Disk quota netlink message daemon
8139e2
# Description:  quota_nld is a deamon that listens on netlink socket and \
8139e2
#               passes disk quota warnings produced by kernel to system \
8139e2
#               D-Bus or terminal user has last accessed.
8139e2
### END INIT INFO
8139e2
8139e2
# Source function library.
8139e2
. /etc/rc.d/init.d/functions
8139e2
8139e2
exec="/usr/sbin/quota_nld"
8139e2
prog="quota_nld"
8139e2
8139e2
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
8139e2
8139e2
lockfile=/var/lock/subsys/$prog
8139e2
8139e2
start() {
8139e2
    [ -x $exec ] || exit 5
8139e2
    echo -n $"Starting $prog: "
4e6314
    daemon $exec $QUOTA_NLD_OPTS
8139e2
    retval=$?
8139e2
    echo
8139e2
    [ $retval -eq 0 ] && touch $lockfile
8139e2
    return $retval
8139e2
}
8139e2
8139e2
stop() {
8139e2
    echo -n $"Stopping $prog: "
8139e2
    killproc $prog
8139e2
    retval=$?
8139e2
    echo
8139e2
    [ $retval -eq 0 ] && rm -f $lockfile
8139e2
    return $retval
8139e2
}
8139e2
8139e2
restart() {
8139e2
    stop
8139e2
    start
8139e2
}
8139e2
8139e2
reload() {
8139e2
    restart
8139e2
}
8139e2
8139e2
force_reload() {
8139e2
    restart
8139e2
}
8139e2
8139e2
rh_status() {
8139e2
    status $prog
8139e2
}
8139e2
8139e2
rh_status_q() {
8139e2
    rh_status >/dev/null 2>&1
8139e2
}
8139e2
8139e2
8139e2
case "$1" in
8139e2
    start)
8139e2
        rh_status_q && exit 0
8139e2
        $1
8139e2
        ;;
8139e2
    stop)
8139e2
        rh_status_q || exit 0
8139e2
        $1
8139e2
        ;;
8139e2
    restart)
8139e2
        $1
8139e2
        ;;
8139e2
    reload)
8139e2
        rh_status_q || exit 7
8139e2
        $1
8139e2
        ;;
8139e2
    force-reload)
8139e2
        force_reload
8139e2
        ;;
8139e2
    status)
8139e2
        rh_status
8139e2
        ;;
8139e2
    condrestart|try-restart)
8139e2
        rh_status_q || exit 0
8139e2
        restart
8139e2
        ;;
8139e2
    *)
8139e2
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
8139e2
        exit 2
8139e2
esac
8139e2
exit $?