Set OpenSUSE IPv6 autoconf/accept_ra=0

pull/89/head
Vlastimil Holer 8 years ago
parent 55c6a1b7a5
commit e256b4a35b
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -94,6 +94,8 @@ if [ -d /etc/sysconfig/network ]; then
rm -f /etc/sysconfig/network/ifcfg-eth*
rm -f /etc/sysconfig/network/ifroute-eth*
rm -f /etc/sysconfig/network/routes
rm -f /etc/sysconfig/network/ifsysctl
rm -f /etc/sysconfig/network/ifsysctl-eth*
sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/=""/' /etc/sysconfig/network/config
sed -i '/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/=""/' /etc/sysconfig/network/config
fi

@ -118,22 +118,27 @@ EOT
}
gen_iface6_conf() {
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
echo "IPADDR_0=$IP6/${IP6_PREFIX_LENGTH:-64}"
else
cat <<EOT
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
echo "IPADDR_0=$IP6/${IP6_PREFIX_LENGTH:-64}"
cat <<EOT >> /etc/sysconfig/network/ifsysctl-$DEV
net.ipv6.conf.\$SYSCTL_IF.autoconf = 0
net.ipv6.conf.\$SYSCTL_IF.accept_ra = 0
EOT
else
cat <<EOT
IPV6INIT=yes
IPV6ADDR=$IP6/${IP6_PREFIX_LENGTH:-64}
IPV6_AUTOCONF=no
EOT
fi
fi
if [ -n "$IP6_ULA" ]; then
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
echo "IPADDR_1=$IP6_ULA/64"
echo "IPADDR_1=$IP6_ULA/64"
else
echo "IPV6ADDR_SECONDARIES=$IP6_ULA/64"
fi
fi
fi
if [ -n "$GATEWAY6" ]; then
@ -202,6 +207,8 @@ gen_network_configuration()
(
rm -f /etc/sysconfig/network/ifroute-$DEV
rm -f /etc/sysconfig/network/ifsysctl-$DEV
cat <<EOT
DEVICE=$DEV
BOOTPROTO=static

Loading…
Cancel
Save