[openwrt/openwrt] netifd: add udhcpc link check to dhcp shell handler script
LEDE Commits
lede-commits at lists.infradead.org
Fri Mar 2 00:49:05 PST 2018
dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/175b2623288957dc7087278d1e78a7eedb077f8f
commit 175b2623288957dc7087278d1e78a7eedb077f8f
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Thu Mar 1 18:38:55 2018 +0100
netifd: add udhcpc link check to dhcp shell handler script
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 at gmail.com>
---
package/network/config/netifd/Makefile | 2 +-
package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 6e208dd..8b5d2f8 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -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
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index afcfba9..a2b0cce 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+[ -L /sbin/udhcpc ] || exit 0
+
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
More information about the lede-commits
mailing list