netifd: relax check in dhcp proto handler
authorDaniel Golle <daniel@makrotopia.org>
Wed, 13 Apr 2022 15:51:58 +0000 (16:51 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 15 Apr 2022 13:12:09 +0000 (14:12 +0100)
Checking whether /sbin/udhcpc is a symbolic link breaks using the
DHCP proto handler inside procd-ujail where bind-mounts are used for
the resolved link. Check whether /sbin/udhcpc is executable instead
to allow using the proto handler for DHCP-provisioned containers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c5f113c43f43c20555298c8500bf91bffbe1f58b)

package/network/config/netifd/files/lib/netifd/proto/dhcp.sh

index 3034b2ba68ea7f69cae8bbca54e42c263e69cdd7..ea6d872eb4926c20a8a9ab6d6468988f00363da1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ -L /sbin/udhcpc ] || exit 0
+[ -x /sbin/udhcpc ] || exit 0
 
 . /lib/functions.sh
 . ../netifd-proto.sh