summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/rtadvd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/rtadvd')
-rwxr-xr-xetc/rc.d/rtadvd17
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd
index 1398afd..5e0a6dc 100755
--- a/etc/rc.d/rtadvd
+++ b/etc/rc.d/rtadvd
@@ -16,17 +16,16 @@ rcvar=`set_rcvar`
command="/usr/sbin/${name}"
start_precmd="rtadvd_precmd"
-case ${OSTYPE} in
-FreeBSD)
- IS_GATEWAY="checkyesno ipv6_gateway_enable"
- ;;
-NetBSD)
- IS_GATEWAY="eval [ \"$ip6mode\" = \"router\" ]"
- ;;
-esac
-
rtadvd_precmd()
{
+ case ${OSTYPE} in
+ FreeBSD)
+ IS_GATEWAY="checkyesno ipv6_gateway_enable"
+ ;;
+ NetBSD)
+ IS_GATEWAY="eval [ \"$ip6mode\" = \"router\" ]"
+ ;;
+ esac
if ! ${IS_GATEWAY}; then
warn \
"${name} cannot be used on IPv6 host, only on an IPv6 router."
OpenPOWER on IntegriCloud