commit:     43f0190924f8c721ebccd75a2d6b99671905bedf
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  9 19:42:16 2019 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 19:42:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=43f01909

net/*: fix ordering of dhcp clients

We want to prefer dhclient over busybox udhcpc if it's available.  This
commit also adds deps to the other services which will guarantee the
priority dhcpcd > dhclient > pump > udhcpc.

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 net/dhclient.sh | 3 +++
 net/dhcpcd.sh   | 4 ++--
 net/pump.sh     | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/net/dhclient.sh b/net/dhclient.sh
index fd27308..24c3512 100644
--- a/net/dhclient.sh
+++ b/net/dhclient.sh
@@ -7,6 +7,9 @@ dhclient_depend()
        after interface
        program start /sbin/dhclient
        provide dhcp
+
+       # We prefer dhclient over these
+       after udhcpc pump
 }
 
 _config_vars="$_config_vars dhcp dhcpcd"

diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh
index 1812b45..0a306b8 100644
--- a/net/dhcpcd.sh
+++ b/net/dhcpcd.sh
@@ -8,8 +8,8 @@ dhcpcd_depend()
        program start dhcpcd
        provide dhcp
 
-       # We prefer dhcpcd over the others
-       after dhclient pump udhcpc
+       # We prefer dhcpcd over these
+       after udhcpc pump dhclient
 }
 
 _config_vars="$_config_vars dhcp dhcpcd"

diff --git a/net/pump.sh b/net/pump.sh
index 270b37d..864b6cf 100644
--- a/net/pump.sh
+++ b/net/pump.sh
@@ -7,6 +7,9 @@ pump_depend()
        program /sbin/pump
        after interface
        provide dhcp
+
+       # We prefer pump over udhcpc
+       after udhcpc
 }
 
 _config_vars="$_config_vars dhcp pump"

Reply via email to