netifd: do not validate relevant section when ipv6 is not supported
authorRosy Song <rosysong@rosinson.com>
Sun, 23 Sep 2018 02:05:04 +0000 (10:05 +0800)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 10:28:14 +0000 (11:28 +0100)
Signed-off-by: Rosy Song <rosysong@rosinson.com>
(backported from a6add47869972139cef9106aecfddbac0b3f64f4)

package/network/config/netifd/files/etc/init.d/network

index 6cd167d19d221dead5e0dc28a518c21c8c120dbb..99d9f6582fb8b7002b48cd280a73521b9fd66450 100755 (executable)
@@ -133,9 +133,9 @@ service_triggers()
        procd_open_validate
        validate_atm_bridge_section
        validate_route_section
-       validate_route6_section
+       [ -e /proc/sys/net/ipv6 ] && validate_route6_section
        validate_rule_section
-       validate_rule6_section
+       [ -e /proc/sys/net/ipv6 ] && validate_rule6_section
        validate_switch_section
        validate_switch_vlan
        procd_close_validate