Skip to content
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

fix(network-legacy): do not require pgrep when using wicked (bsc#1236982) (SLE15-SP6:Update) #401

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules.d/35network-legacy/ifup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ for p in $(getargs ip=); do
do_dhcp -4
;;
single-dhcp)
if command -v wicked > /dev/null; then
warn "DHCP in parallel on all available interfaces not available with wicked."
exit 1
fi
do_dhcp_parallel -4
exit 0
;;
Expand Down
16 changes: 10 additions & 6 deletions modules.d/35network-legacy/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# called by dracut
check() {
require_binaries ip sed awk grep pgrep tr expr || return 1
require_binaries ip sed awk grep tr expr || return 1

require_any_binary arping arping2 wicked || return 1
require_any_binary dhclient wicked || return 1
Expand Down Expand Up @@ -34,22 +34,26 @@ install() {
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
fi

inst_multiple ip sed awk grep pgrep tr expr
inst -o dhclient
inst_multiple ip sed awk grep tr expr
if command -v wicked > /dev/null; then
inst wicked
else
inst_multiple dhclient pgrep
inst_simple -H "/etc/dhclient.conf"
cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
fi

inst_multiple -o arping arping2
if command -v arping > /dev/null; then
strstr "$(arping 2>&1)" "ARPing 2" && mv "$initdir/bin/arping" "$initdir/bin/arping2"
fi
inst_multiple -o wicked

inst_multiple -o ping ping6
inst_multiple -o teamd teamdctl teamnl
inst_simple /etc/libnl/classid
inst_script "$moddir/ifup.sh" "/sbin/ifup"
inst_script "$moddir/dhcp-multi.sh" "/sbin/dhcp-multi.sh"
inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
inst_simple -H "/etc/dhclient.conf"
cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
inst_hook cmdline 92 "$moddir/parse-ibft.sh"
inst_hook cmdline 95 "$moddir/parse-vlan.sh"
Expand Down
3 changes: 2 additions & 1 deletion modules.d/40network/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# called by dracut
check() {
require_binaries ip sed awk grep || return 1
return 255
}

Expand Down Expand Up @@ -42,7 +43,7 @@ install() {
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
inst_multiple ip sed awk grep pgrep tr
inst_multiple ip sed awk grep
inst_multiple -o arping arping2
dracut_need_initqueue
}
Loading