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)
committerHans Dedecker <dedeckeh@gmail.com>
Tue, 25 Sep 2018 20:35:38 +0000 (22:35 +0200)
Signed-off-by: Rosy Song <rosysong@rosinson.com>
package/network/config/netifd/Makefile
package/network/config/netifd/files/etc/init.d/network

index b511b5d..1694a5f 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
index 6cd167d..99d9f65 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