gdt | 69f1fc2 | 2004-08-27 15:57:35 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # ospfd is part of the quagga routing beast |
| 4 | # |
| 5 | # PROVIDE: ospfd |
| 6 | # REQUIRE: zebra |
| 7 | ## |
| 8 | |
gdt | cbd0408 | 2004-08-31 18:16:36 +0000 | [diff] [blame^] | 9 | PATH=/sbin:/bin:/usr/sbin:/usr/bin:@prefix@/sbin:@prefix@/bin |
gdt | 69f1fc2 | 2004-08-27 15:57:35 +0000 | [diff] [blame] | 10 | export PATH |
| 11 | |
| 12 | if [ -f /etc/rc.subr ] |
| 13 | then |
| 14 | . /etc/rc.subr |
| 15 | fi |
| 16 | |
| 17 | name="ospfd" |
| 18 | rcvar=$name |
gdt | cbd0408 | 2004-08-31 18:16:36 +0000 | [diff] [blame^] | 19 | required_files="@sysconfdir@/${name}.conf" |
| 20 | command="@prefix@/sbin/${name}" |
gdt | 69f1fc2 | 2004-08-27 15:57:35 +0000 | [diff] [blame] | 21 | command_args="-d" |
| 22 | |
| 23 | start_precmd="zebra_precmd" |
gdt | cbd0408 | 2004-08-31 18:16:36 +0000 | [diff] [blame^] | 24 | socket_dir=@localstatedir@ |
gdt | 69f1fc2 | 2004-08-27 15:57:35 +0000 | [diff] [blame] | 25 | pidfile="${socket_dir}/${name}.pid" |
| 26 | |
| 27 | zebra_precmd() |
| 28 | { |
| 29 | rc_flags="$( |
| 30 | set -- $rc_flags |
| 31 | while [ $# -ne 0 ]; do |
| 32 | if [ X"$1" = X-P -o X"$1" = X-A ]; then |
| 33 | break |
| 34 | fi |
| 35 | shift |
| 36 | done |
| 37 | if [ $# -eq 0 ]; then |
| 38 | echo "-P 0" |
| 39 | fi |
| 40 | ) $rc_flags" |
| 41 | } |
| 42 | |
| 43 | load_rc_config $name |
| 44 | run_rc_command "$1" |