New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USE_DHCLIENT=y but get the static ip-address when booting from iso #1703
Comments
@RolfWeilen What is the content of |
Hi RESCUE res9901:~ # cat /etc/rear/rescue.conf # initialize our /etc/rear/rescue.conf file sourced by the rear command in recover mode # also the configuration is sourced by system-setup script during booting our recovery image SHARE_DIR="/usr/share/rear" CONFIG_DIR="/etc/rear" VAR_DIR="/var/lib/rear" LOG_DIR="/var/log/rear" # The following 3 lines were added through 210_include_dhclient.sh USE_DHCLIENT=y DHCLIENT_BIN=dhclient DHCLIENT6_BIN= # TMPDIR variable may be defined in local.conf file as prefix dir for mktemp command # e.g. by defining TMPDIR=/var we would get our BUILD_DIR=/var/tmp/rear.XXXXXXXXXXXX # However, in rescue we want our BUILD_DIR=/tmp/rear.XXXXXXX as we are not sure that # the user defined TMPDIR would exist in our rescue image # by 'unset TMPDIR' we achieve above goal (as rescue.conf is read after local.conf)! unset TMPDIR Best reagards |
I see several of your config variables set as VARIABLE=n which may or may not work as expected Often config variables that have a boolean meaning # Boolean variables can be set to anything as we only check whether the variable # is not empty so that both VAR=yes and VAR=no evaluate to boolean 'true'. # To set a boolean variable to 'false' set it to an empty value. In particular regarding USE_STATIC_NETWORKING=n there is in # with USE_STATIC_NETWORKING no networking setup via DHCP must happen # see default.conf: USE_STATIC_NETWORKING overrules USE_DHCLIENT test "$USE_STATIC_NETWORKING" && return Accordingly I think DHCP will work with USE_DHCLIENT=y USE_STATIC_NETWORKING= or even better without any setting of USE_STATIC_NETWORKING in local.conf # Say "y", "Yes" (or any not empty string) to enable static networking (overrules USE_DHCLIENT): USE_STATIC_NETWORKING= In general regarding debugging issues with the start up scripts The basic idea behind is to not let those start up scripts Add 'debug' to the ReaR kernel command line In the ReaR recovery/rescue system boot menue select You may found yourself stopped at a blank screen. The further start up scripts are run one by one In 'debug' mode the start up scripts are run with 'set -x' Cf. |
Hi Thanks a lot. |
@RolfWeilen Check also your other |
@jsmeix perhaps we should add an additional check for some variables if they are set to false to define these correctly in the rescue.conf ? Or, is this too much overhead? Just for those vars we are supposed to be empty instead of 'n'? |
From my point of view additional checks are more a dirty band-aid hack. I think we should better implement support for user-friendly boolean variables On the other hand using the is_true() and is_false() functions everywhere is_false "$VAR" && VAR="" The existing verify/default/040_validate_variables.sh |
Relax-and-Recover (ReaR) Issue Template
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
Relax-and-Recover 2.3 / 2017-12-20
OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=7
BIOS
When i booting with iso image i get the original ip-address instead of an dhcp address. The original server ip-adress is not in the dhcp address range. I can run on the rescue prompt dhclient -r and dhclient to get an dhcp address.
The text was updated successfully, but these errors were encountered: