2006-10-07 15:45:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: auto_linklocal
|
|
|
|
# REQUIRE: root
|
|
|
|
# BEFORE: sysctl
|
2006-12-29 15:56:21 +00:00
|
|
|
# KEYWORD: nojail
|
2006-10-07 15:45:56 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
2006-12-08 06:34:06 +00:00
|
|
|
. /etc/network.subr
|
2006-10-07 15:45:56 +00:00
|
|
|
|
|
|
|
name="auto_linklocal"
|
2006-10-13 12:41:36 +00:00
|
|
|
start_cmd="auto_linklocal_start"
|
2006-10-07 15:45:56 +00:00
|
|
|
stop_cmd=":"
|
|
|
|
|
2006-10-13 12:41:36 +00:00
|
|
|
auto_linklocal_start()
|
|
|
|
{
|
2006-10-22 17:21:03 +00:00
|
|
|
if ! checkyesno ipv6_enable && ${SYSCTL} net.inet6 > /dev/null 2>&1; then
|
2006-10-13 12:41:36 +00:00
|
|
|
${SYSCTL_W} net.inet6.ip6.auto_linklocal=0
|
2006-12-08 06:34:06 +00:00
|
|
|
laddr=`network6_getladdr lo0`
|
|
|
|
if [ -z "${laddr}" ]; then
|
|
|
|
ifconfig lo0 inet6 fe80::1 prefixlen 64
|
|
|
|
fi
|
2006-10-13 12:41:36 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-10-07 15:45:56 +00:00
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|