diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-13 18:28:50 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-13 18:28:50 +0200 |
commit | f218cbf49d4e521f0186f3879ce977040bcd54b3 (patch) | |
tree | f812014901c82f01a00d439db0db4802c2941dc8 /src/connections/ethernet | |
parent | 80121affa055e21e967ed84eccd157483a7570ff (diff) | |
download | netctl-f218cbf49d4e521f0186f3879ce977040bcd54b3.tar.gz netctl-f218cbf49d4e521f0186f3879ce977040bcd54b3.tar.xz |
ethernet: load ipv6 module if necessary (FS#25530)
If ipv6 module is not loaded, net.ipv6.* settings in
/proc/sys are not yet available.
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r-- | src/connections/ethernet | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index dba693b..04d65fa 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -132,6 +132,19 @@ ethernet_up() { done fi + # Load ipv6 module if necessary (FS#25530) + case "$IP6" in + dhcp*|stateless|static) + [ -d "/proc/sys/net/ipv6" ] || modprobe ipv6 + ;; + ""|no) + [ -d /proc/sys/net/ipv6 ] && sysctl -q -w net.ipv6.conf.$INTERFACE.accept_ra=0 + ;; + *) + report_iproute "IP6 must be 'dhcp', 'dhcp-noaddr', 'stateless', 'static' or 'no'" + ;; + esac + case "$IP6" in dhcp*) if [[ -x /usr/sbin/dhclient ]]; then @@ -183,12 +196,6 @@ ethernet_up() { done fi ;; - ""|no) - sysctl -q -w net.ipv6.conf.$INTERFACE.accept_ra=0 - ;; - *) - report_iproute "IP6 must be 'dhcp', 'dhcp-noaddr', 'stateless', 'static' or 'no'" - ;; esac # Set hostname |