Skip to content

Commit

Permalink
Update debian xorp start file.
Browse files Browse the repository at this point in the history
Warn users if 'daemon' doesn't exist.
Use /etc/xorp.conf for config file by default.
Use /usr/local/xorp/sbin for default xorp binary location.
Signed-off-by: Ben Greear <greearb@candelatech.com>
  • Loading branch information
greearb committed Mar 22, 2011
1 parent 9062ba8 commit e05e950
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions xorp/contrib/init_scripts/debian/xorp
Expand Up @@ -14,21 +14,26 @@
# OSPF, RIP/RIPng, IGMP/MLD and PIM-SM.
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/xorp_rtrmgr
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/xorp/sbin
DAEMON=/usr/local/xorp/sbin/xorp_rtrmgr
DAEMON_WRAPPER=/usr/bin/daemon

NAME=xorp
PIDFILE=/var/run/$NAME.pid
DESC="eXtensible Open Router Platform"

test -x $DAEMON || exit 0
test -x $DAEMON_WRAPPER || exit 0

if [ ! -x $DAEMON_WRAPPER ]
then
echo "ERROR: daemon program not installed: $DAEMON_WRAPPER"
exit 1
fi

. /lib/lsb/init-functions

RUN="no"
DAEMON_OPTS=""
DAEMON_OPTS="-b /etc/xorp.conf"
# time to wait for daemons death, in seconds
# don't set it too low or you might not let xorp die gracefully
DIETIME=10
Expand All @@ -39,13 +44,6 @@ if [ -f /etc/default/xorp ] ; then
. /etc/default/xorp
fi

if [ "x$RUN" != "xyes" ] ; then
log_failure_msg "XORP disabled, please adjust the configuration at /etc/xorp/config.boot"
log_failure_msg "to your needs and then set RUN to 'yes' in /etc/default/xorp to "
log_failure_msg "enable the router manager daemon"
exit 1
fi

set -e

running_pid()
Expand Down

0 comments on commit e05e950

Please sign in to comment.