From: <abe...@us...> - 2017-05-11 23:53:47
|
Revision: 8299 http://sourceforge.net/p/astlinux/code/8299 Author: abelbeck Date: 2017-05-11 23:53:44 +0000 (Thu, 11 May 2017) Log Message: ----------- network, tweak Static IPv4 and DHCPv6 special case on startup Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-11 21:24:35 UTC (rev 8298) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-11 23:53:44 UTC (rev 8299) @@ -638,22 +638,26 @@ ip link set dev $EXTIF up ;; *) + up_delay=0 ip addr add $EXTIP/$EXTNM brd + dev $EXTIF if [ -n "$EXTIP_ALIAS" ]; then alias_interface add $EXTIF "$EXTIP_ALIAS" fi - if [ "$IPV6" = "yes" ] && [ "$DHCPV6_CLIENT_ENABLE" != "yes" -o "$DHCPV6_CLIENT_REQUEST_ADDRESS" = "no" ]; then - if [ -n "$EXTIPV6" ]; then - ip -6 addr add $EXTIPV6 dev $EXTIF + if [ "$IPV6" = "yes" ]; then + if [ "$DHCPV6_CLIENT_ENABLE" = "yes" ]; then + up_delay=4 + init_dhcp6c extif $EXTIF + ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/dhcp6c.action fi + if [ "$DHCPV6_CLIENT_ENABLE" != "yes" -o "$DHCPV6_CLIENT_REQUEST_ADDRESS" = "no" ]; then + if [ -n "$EXTIPV6" ]; then + ip -6 addr add $EXTIPV6 dev $EXTIF + fi + fi fi ip link set dev $EXTIF up - if [ "$IPV6" = "yes" -a "$DHCPV6_CLIENT_ENABLE" = "yes" ]; then - sleep 4 - init_dhcp6c extif $EXTIF - dhcp6c -c /etc/wide-dhcpv6/dhcp6c-$EXTIF.conf -p /var/run/dhcp6c-$EXTIF.pid $EXTIF - ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/dhcp6c.action - sleep 2 + if [ $up_delay -gt 0 ]; then + sleep $up_delay fi ;; esac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |