]>
git.ipfire.org Git - thirdparty/lldpd.git/blob - debian/lldpd.init.d
4 # Required-Start: $remote_fs $network $syslog
5 # Required-Stop: $network $remote_fs $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: LLDP daemon
9 # Description: lldpd is a 802.1AB implementation, a L2 network
10 # discovery protocol. It also supports CDP, EDP and
11 # various other protocols.
16 # PATH should only include /usr/* if it runs after the mountnfs.sh script
17 PATH
=/sbin
:/usr
/sbin
:/bin
:/usr
/bin
20 DAEMON
=/usr
/sbin
/$NAME
22 PIDFILE
=/var
/run
/$NAME.pid
23 SCRIPTNAME
=/etc
/init.d
/$NAME
26 # Exit if the package is not installed
27 [ -x "$DAEMON" ] ||
exit 0
29 # Read configuration variable file if it is present
30 [ -r /etc
/default
/$NAME ] && .
/etc
/default
/$NAME
32 [ -f /lib
/init
/vars.sh
] && .
/lib
/init
/vars.sh
33 .
/lib
/lsb
/init-functions
39 [ -d $CHROOT/etc
] || mkdir
-p $CHROOT/etc
40 [ -f $CHROOT/etc
/localtime
] ||
[ ! -f /etc
/localtime
] || \
41 cp /etc
/localtime
$CHROOT/etc
/localtime
48 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev
/null \
50 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
57 start-stop-daemon
--stop --quiet --retry=TERM
/30/KILL
/5 --pidfile $PIDFILE --name $NAME
59 [ "$RETVAL" = 2 ] && return 2
60 start-stop-daemon
--stop --quiet --oknodo --retry=0/30/KILL
/5 --exec $DAEMON
61 [ "$?" = 2 ] && return 2
67 start-stop-daemon
--stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
73 [ "$VERBOSE" != no
] && log_daemon_msg
"Starting $DESC" "$NAME"
76 0|
1) [ "$VERBOSE" != no
] && log_end_msg
0 ;;
77 2) [ "$VERBOSE" != no
] && log_end_msg
1 ;;
81 [ "$VERBOSE" != no
] && log_daemon_msg
"Stopping $DESC" "$NAME"
84 0|
1) [ "$VERBOSE" != no
] && log_end_msg
0 ;;
85 2) [ "$VERBOSE" != no
] && log_end_msg
1 ;;
89 log_daemon_msg
"Reloading $DESC" "$NAME"
94 log_daemon_msg
"Restarting $DESC" "$NAME"
101 1) log_end_msg
1 ;; # Old process is still running
102 *) log_end_msg
1 ;; # Failed to start
112 status_of_proc
$DAEMON $NAME -p $PIDFILE && exit 0 ||
exit $?
115 echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2