Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 - 1
#!/bin/sh
2
#
3
# quota_nld     Disk quota netlink message daemon
4
#
5
# chkconfig:   - 25 75
6
# description:  quota_nld is a deamon that listens on netlink socket and \
7
#               passes disk quota warnings produced by kernel to system \
8
#               D-Bus or terminal user has last accessed.
9
 
10
### BEGIN INIT INFO
11
# Provides: quota_nld
12
# Required-Start: $local_fs
13
# Should-Start: $syslog messagebus
14
# Should-Stop: $syslog messagebus
15
# Short-Description: Disk quota netlink message daemon
16
# Description:  quota_nld is a deamon that listens on netlink socket and \
17
#               passes disk quota warnings produced by kernel to system \
18
#               D-Bus or terminal user has last accessed.
19
### END INIT INFO
20
 
21
# Source function library.
22
. /etc/rc.d/init.d/functions
23
 
24
exec="/usr/sbin/quota_nld"
25
prog="quota_nld"
26
 
27
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
28
 
29
lockfile=/var/lock/subsys/$prog
30
 
31
start() {
32
    [ "$(id -u)" -eq 0 ] || exit 4
33
    [ -x $exec ] || exit 5
34
    echo -n $"Starting $prog: "
35
    daemon $exec $QUOTA_NLD_OPTS
36
    retval=$?
37
    echo
38
    [ $retval -eq 0 ] && touch $lockfile
39
    return $retval
40
}
41
 
42
stop() {
43
    [ "$(id -u)" -eq 0 ] || exit 4
44
    echo -n $"Stopping $prog: "
45
    killproc $prog
46
    retval=$?
47
    echo
48
    [ $retval -eq 0 ] && rm -f $lockfile
49
    return $retval
50
}
51
 
52
restart() {
53
    stop
54
    start
55
}
56
 
57
reload() {
58
    restart
59
}
60
 
61
force_reload() {
62
    restart
63
}
64
 
65
rh_status() {
66
    status $prog
67
}
68
 
69
rh_status_q() {
70
    rh_status >/dev/null 2>&1
71
}
72
 
73
 
74
case "$1" in
75
    start)
76
        rh_status_q && exit 0
77
        $1
78
        ;;
79
    stop)
80
        rh_status_q || exit 0
81
        $1
82
        ;;
83
    restart)
84
        $1
85
        ;;
86
    reload)
87
        rh_status_q || exit 7
88
        $1
89
        ;;
90
    force-reload)
91
        force_reload
92
        ;;
93
    status)
94
        rh_status
95
        ;;
96
    condrestart|try-restart)
97
        rh_status_q || exit 0
98
        restart
99
        ;;
100
    *)
101
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
102
        exit 2
103
esac
104
exit $?