fc61bfebd0
Spotted by: Keve Nagy PR: conf/107083
31 lines
513 B
Bash
31 lines
513 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: auto_linklocal
|
|
# REQUIRE: root
|
|
# BEFORE: sysctl
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
. /etc/network.subr
|
|
|
|
name="auto_linklocal"
|
|
start_cmd="auto_linklocal_start"
|
|
stop_cmd=":"
|
|
|
|
auto_linklocal_start()
|
|
{
|
|
if ! checkyesno ipv6_enable && ${SYSCTL} net.inet6 > /dev/null 2>&1; then
|
|
${SYSCTL_W} net.inet6.ip6.auto_linklocal=0
|
|
laddr=`network6_getladdr lo0`
|
|
if [ -z "${laddr}" ]; then
|
|
ifconfig lo0 inet6 fe80::1 prefixlen 64
|
|
fi
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|