~ubuntu-branches/ubuntu/hardy/freeradius/hardy-proposed

« back to all changes in this revision

Viewing changes to suse/rcradiusd

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-12-16 20:45:11 UTC
  • mfrom: (3.1.10 feisty)
  • Revision ID: james.westby@ubuntu.com-20061216204511-3pbbsu4s8jtehsor
Tags: 1.1.3-3
Fix POSIX compliance problem in init script.  Closes: #403384. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Copyright (c) 2001       SuSE GmbH Nuernberg, Germany.
3
3
#               2002, 2003 SuSE Linux AG, Nuernberg, Germany.
4
4
#
5
 
# Author: Wolfgang Rosenauer <feedback@suse.de>, 2000-2003
 
5
# Author: Wolfgang Rosenauer, 2000-2003
6
6
#
7
7
# /etc/init.d/radiusd
8
8
#
13
13
### BEGIN INIT INFO
14
14
# Provides:          radiusd
15
15
# Required-Start:    $network $syslog $remotefs
 
16
# Should-Start:      $time postgresql mysql ldap samba krb5kdc
16
17
# Required-Stop:
 
18
# Should-Stop:       $time postgresql mysql ldap
17
19
# Default-Start:     3 5
18
20
# Default-Stop:      0 1 2 6
19
21
# Short-Description: RADIUS-Server
21
23
### END INIT INFO
22
24
 
23
25
RADIUSD_BIN=/usr/sbin/radiusd
24
 
test -x $RADIUSD_BIN || exit 5
 
26
test -x $RADIUSD_BIN || { echo "$RADIUSD_BIN not installed"; \
 
27
        if [ "$1" = "stop" ]; then exit 0;
 
28
        else exit 5; fi; }
25
29
 
26
30
. /etc/rc.status
27
31
 
37
41
        killproc -TERM $RADIUSD_BIN 
38
42
        rc_status -v    
39
43
        ;;
40
 
    try-restart)
 
44
    try-restart|condrestart)
41
45
        ## If first returns OK call the second, if first or
42
46
        ## second command fails, set echo return value.
43
 
        $0 status >/dev/null &&  $0 restart
 
47
        if test "$1" = "condrestart"; then
 
48
                echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
 
49
        fi
 
50
        $0 status
 
51
        if test $? = 0; then
 
52
                $0 restart
 
53
        else
 
54
                rc_reset        # Not running is not a failure.
 
55
        fi
44
56
        rc_status
45
57
        ;;
46
58
    restart)