-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add start/stop scripts for the rc.d framework used by
pkgsrc (NetBSD and others). Contributed by Miles Nordin.
- Loading branch information
gdt
committed
Aug 27, 2004
1 parent
5a9c53d
commit 69f1fc2
Showing
10 changed files
with
287 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
## Process this file with automake to produce Makefile.in. | ||
|
||
SUBDIRS = lib @ZEBRA@ @BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ \ | ||
@ISISD@ @VTYSH@ @OSPFCLIENT@ redhat doc | ||
@ISISD@ @VTYSH@ @OSPFCLIENT@ pkgsrc redhat doc | ||
|
||
DIST_SUBDIRS = lib zebra bgpd ripd ripngd ospfd ospf6d \ | ||
isisd vtysh ospfclient doc redhat tests | ||
isisd vtysh ospfclient doc pkgsrc redhat tests | ||
|
||
EXTRA_DIST = aclocal.m4 SERVICES TODO REPORTING-BUGS vtysh/Makefile.in \ | ||
vtysh/Makefile.am update-autotools \ | ||
tools/mrlg.cgi tools/rrcheck.pl tools/rrlookup.pl tools/zc.pl \ | ||
tools/zebra.el m4 | ||
|
||
|
||
ACLOCAL_AMFLAGS = -I m4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EXTRA_DIST = bgpd.sh ospf6d.sh ospfd.sh ripd.sh ripngd.sh zebra.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$Id: README.txt,v 1.1 2004/08/27 15:57:35 gdt Exp $ | ||
|
||
This directory contains files for use with the pkgsrc framework | ||
(http://www.pkgsrc.org) used with NetBSD and other operating systems. | ||
Eventually it will be hooked into automake such that they can be | ||
installed in /usr/pkg/etc/rc.d (via configure option, probably). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# bgpd is part of the quagga routing beast | ||
# | ||
# PROVIDE: bgpd | ||
# REQUIRE: zebra | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="bgpd" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# ospf6d is part of the quagga routing beast | ||
# | ||
# PROVIDE: ospf6d | ||
# REQUIRE: zebra | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="ospf6d" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# ospfd is part of the quagga routing beast | ||
# | ||
# PROVIDE: ospfd | ||
# REQUIRE: zebra | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="ospfd" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# ripd is part of the quagga routing beast | ||
# | ||
# PROVIDE: ripd | ||
# REQUIRE: zebra | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="ripd" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# ripngd is part of the quagga routing beast | ||
# | ||
# PROVIDE: ripngd | ||
# REQUIRE: zebra | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="ripngd" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/sh | ||
# | ||
# zebra is the head of the quagga routing beast | ||
# | ||
# PROVIDE: zebra | ||
# REQUIRE: NETWORKING | ||
## | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin | ||
export PATH | ||
|
||
if [ -f /etc/rc.subr ] | ||
then | ||
. /etc/rc.subr | ||
fi | ||
|
||
name="zebra" | ||
rcvar=$name | ||
required_files="@PKG_SYSCONFDIR@/${name}.conf" | ||
command="@PREFIX@/sbin/${name}" | ||
command_args="-d" | ||
|
||
start_precmd="zebra_precmd" | ||
stop_postcmd="zebra_postcmd" | ||
socket_dir=/var/run/zebra | ||
pidfile="${socket_dir}/${name}.pid" | ||
|
||
zebra_precmd() | ||
{ | ||
mkdir -p "${socket_dir}" | ||
chown quagga.quagga "${socket_dir}" | ||
chmod 750 "${socket_dir}" | ||
rc_flags="$( | ||
set -- $rc_flags | ||
while [ $# -ne 0 ]; do | ||
if [ X"$1" = X-P -o X"$1" = X-A ]; then | ||
break | ||
fi | ||
shift | ||
done | ||
if [ $# -eq 0 ]; then | ||
echo "-P 0" | ||
fi | ||
) $rc_flags" | ||
} | ||
|
||
zebra_postcmd() | ||
{ | ||
if [ -d "${socketdir}" ]; then | ||
rmdir ${socketdir} | ||
fi | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |