netifd: add udhcpc link check to dhcp shell handler script
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 1 Mar 2018 17:38:55 +0000 (18:38 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 2 Mar 2018 08:48:41 +0000 (09:48 +0100)
Fixes the assumption the busybox udhcpc applet is always enabled; in case
the symbolic link check fails the DHCP shell handler script will exit and
as result the DHCP protocol handler will not be registered in netifd.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/config/netifd/Makefile
package/network/config/netifd/files/lib/netifd/proto/dhcp.sh

index 6e208ddd964195b2aedfcc9e3d0eb20396007126..8b5d2f8ff3a38d9cffaf0cb3064f5f0aabce83e6 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
index afcfba9f49a737dca9f75ca25aa0ad59a60cd171..a2b0ccedbf3271e5a2793cc00b813247ba8330aa 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+[ -L /sbin/udhcpc ] || exit 0
+
 . /lib/functions.sh
 . ../netifd-proto.sh
 init_proto "$@"