-
-
Notifications
You must be signed in to change notification settings - Fork 268
Some fixes and addons for recovery system networking setup #960
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
Some fixes and addons for recovery system networking setup #960
Conversation
|
@gdha # Skip netscript if noip is configured on the command line:
cat <<EOT >> $netscript
if [[ -e /proc/cmdline ]] ; then
if grep -q 'noip' /proc/cmdline ; then
return
fi
fi
EOT
# Add a line at the top of netscript to skip if dhclient will be used:
cat - <<EOT > $netscript
# if USE_DHCLIENT=y then use DHCP instead and skip 60-network-devices.sh
[[ ! -z "\$USE_DHCLIENT" && -z "\$USE_STATIC_NETWORKING" ]] && return
...
EOT
Therin the > $netscript was plain wrong because Now it is # When DHCP is used via 58-start-dhclient.sh do not mess up the existing networking setup
# here by possibly conflicting network devices setup via 60-network-devices.sh:
if test $USE_DHCLIENT -a -z $USE_STATIC_NETWORKING ; then
Log "No network devices setup via 60-network-devices.sh because that happens via DHCP in 58-start-dhclient.sh."
# To be on the safe side remove network_devices_setup_script if it somehow already exists:
rm $v -f $network_devices_setup_script >&2
return
fi
This changes the behaviour becaus now it evaluates But I think now it is still correct and much simpler I know that after the recovery system has booted |
|
Ah! Therefore I will change my change so that even in case of DHCP @gdha |
|
UEFI starts to be pretty boring, so here I am messing a bit with networking :-) (hope nobody minds). I have three basic questions (most probably for @gdha):
I personally don't mind setting up network manually (I've used recovery solution where I needed to load firmware to NIC prior driver loading not talking about pure happiness when I was able to successfully finish PXE boot without kernel panic or hang, so for me ReaR is real RELAX and RECOVER :-)), but I've understood that your policy is to bring rear recover to point where everything is ready. |
|
@gozora Seriously: |
|
@jsmeix actually working on ReaR gave a the reason to study UEFI and boot loaders in more detail (there is nothing like a good motivation). And yes, couple days ago I've started to dig into systemd, so I hope this knowledge will become useful one day. When talking about network automatic configuration, I'd like to know what is ReaR policy:
? Thanks for that link! |
…RKING_PREPARATION_COMMANDS see default.conf for description (issue951)
|
I replaced support for NETWORKING_SETUP_COMMANDS |
|
I still need to test it... |
|
Regarding Personally I would prefer to do only a simple But I fear enterprise users love to have complicated Cf. #951 (comment) Unfortunately in our env we do not have DHCP assigned IP addresses and we MUST use VLAN tagging. and I also remember a SUSE customer where there Because I think it is hopeless to try to make the |
|
Well, VLAN is definitely a must have. I was rather talking about luxury things like bonding that could be dropped in theory (during recovery phase). |
|
My current fixes and the new support for the When I have only USE_DHCLIENT="yes" nothing changed for me - i.e. I get only networking setup When I have only NETWORKING_PREPARATION_COMMANDS=( 'ip addr add 10.160.4.255/16 dev eth0' 'ip link set dev eth0 up' 'ip route add default via 10.160.255.254' 'return' ) I get networking setup only with that commands. When I have (same as before but without the 'return'): NETWORKING_PREPARATION_COMMANDS=( 'ip addr add 10.160.4.255/16 dev eth0' 'ip link set dev eth0 up' 'ip route add default via 10.160.255.254' ) I get networking setup via the When I have USE_DHCLIENT="yes" NETWORKING_PREPARATION_COMMANDS=( 'ip addr add 10.160.4.255/16 dev eth0' 'ip link set dev eth0 up' 'ip route add default via 10.160.255.254' 'return' ) I get first networking setup via DHCP via 58-start-dhclient.sh and When I have USE_DHCLIENT="yes" NETWORKING_PREPARATION_COMMANDS=( 'ip addr add 10.160.4.255/16 dev eth0' 'ip link set dev eth0 up' 'ip route add default via 10.160.255.254' 'USE_STATIC_NETWORKING="yes"' ) I get first networking setup via DHCP via 58-start-dhclient.sh and Not that it makes much sense to have many IP addresses I think I will merge it soon if there is no furious objection... |
|
I merged it because I like it so much now ;-) I would very much apprerciate feedback if the new |
Changed how rescue/GNU/Linux/31_network_devices.sh
behaves when DHCP should be used for recovery system
networking setup: Now in this case it does no longer generate /etc/scripts/system-setup.d/60-network-devices.sh
(before it generated one which does only 'return').
Added support for manual recovery system networking setup
via NETWORKING_SETUP_COMMANDS, see default.conf.
This functionality is intended to be helpful as some kind of
"last resort" when the default automated network devices setup
does not at all work in some special cases.
I tested it on my SLES12-SP2-beta5 test system with
and for me it works.
see #951