diff options
Diffstat (limited to 'pkgsrc/ospf6d.sh.in')
-rw-r--r-- | pkgsrc/ospf6d.sh.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgsrc/ospf6d.sh.in b/pkgsrc/ospf6d.sh.in new file mode 100644 index 0000000..3fbdb81 --- /dev/null +++ b/pkgsrc/ospf6d.sh.in @@ -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="@sysconfdir@/${name}.conf" +command="@prefix@/sbin/${name}" +command_args="-d" + +start_precmd="zebra_precmd" +socket_dir=@localstatedir@ +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" |