File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
modules.d/35network-legacy Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ do_dhclient() {
21
21
_timeout=$( getarg rd.net.timeout.dhcp=)
22
22
_DHCPRETRY=$( getargnum 1 1 1000000000 rd.net.dhcp.retry=)
23
23
24
+ if [ -n " $_timeout " ]; then
25
+ if ! (dhclient --help 2>&1 | grep -q -F -- ' --timeout' 2> /dev/null); then
26
+ warn " rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
27
+ unset _timeout
28
+ fi
29
+ fi
30
+
24
31
while [ $_COUNT -lt " $_DHCPRETRY " ]; do
25
32
info " Starting dhcp for interface $netif "
26
33
dhclient " $arg " \
Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ do_dhcp() {
73
73
return 1
74
74
fi
75
75
76
+ if [ -n " $_timeout " ]; then
77
+ if ! (dhclient --help 2>&1 | grep -q -F -- ' --timeout' 2> /dev/null); then
78
+ warn " rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
79
+ unset _timeout
80
+ fi
81
+ fi
82
+
76
83
if [ ! -e /run/NetworkManager/conf.d/10-dracut-dhclient.conf ]; then
77
84
mkdir -p /run/NetworkManager/conf.d
78
85
echo ' [main]' > /run/NetworkManager/conf.d/10-dracut-dhclient.conf
You can’t perform that action at this time.
0 commit comments