Skip to content

Commit

Permalink
Allow disabling dhclient by setting USE_DHCLIENT='n'
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverO2 committed Dec 2, 2017
1 parent 8cd61ff commit 5f69d59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/share/rear/conf/default.conf
Expand Up @@ -1935,8 +1935,8 @@ SIMPLIFY_BONDING=
# e.g. when no VGA console is available (say y, n or leave empty to autodetect):
USE_SERIAL_CONSOLE=

# Say "y", "Yes" (or any not empty string) to enable the DHCP client protocol
# which lets the rescue/recovery system run dhclient to get an IP address
# Say "y", "Yes", etc, to enable or "n", "No" etc. to disable the DHCP client protocol or leave empty to autodetect.
# When enabled, lets the rescue/recovery system run dhclient to get an IP address
# instead of using the same IP address as the original system:
USE_DHCLIENT=

Expand Down
7 changes: 7 additions & 0 deletions usr/share/rear/prep/GNU/Linux/210_include_dhclient.sh
Expand Up @@ -49,6 +49,13 @@ define_dhclient_bins()

##### M A I N #####
###################

# Respect an explicit rejection
if is_false "$USE_DHCLIENT"; then
Log "Excluding DHCP client excluded (USE_DHCLIENT=\"$USE_DHCLIENT\")"
return 0
fi

# if DHCP client binaries were predefined (in the /etc/rear/local.conf file)
# we pick them up here
DHCLIENT_BIN=${DHCLIENT_BIN##*/}
Expand Down

0 comments on commit 5f69d59

Please sign in to comment.