freebsd-dev/etc/rc.d/auto_linklocal
Hiroki Sato fc61bfebd0 Add "nojail" keyword to prevent spurious error messages.
Spotted by:	Keve Nagy
PR:		conf/107083
2006-12-29 15:56:21 +00:00

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"