3 # $NetBSD: rtadvd,v 1.8 2013/07/09 09:34:58 roy Exp $
10 $_rc_subr_loaded .
/etc
/rc.subr
14 command="/usr/sbin/$name"
15 pidfile
="/var/run/$name.pid"
17 start_precmd
=rtadvd_prestart
18 reload_precmd
=rtadvd_prereload
22 local chdir
="$(getent passwd _rtadvd | cut -d: -f6)"
23 local conf
=/etc
/rtadvd.conf myflags o confdir
25 [ -z "$chdir" -o "$chdir" = / ] && return 0
27 if [ -n "$flags" ]; then
30 eval myflags
=\$
${name}_flags
33 while getopts c
:dDfM
:Rs o
; do
39 confdir
=$
(dirname "$conf")
41 echo "$name: copying $conf to $chdir$conf"
42 cp "$conf" "$chdir$conf"
44 # Provide a link to the chrooted dump file
45 ln -snf "$chdir/var/run/$name.dump" /var
/run
50 if [ "$ip6mode" != router
]; then
52 "${name} cannot be used on IPv6 host, only on an IPv6 router."