89f9350d9e
- Fix dmraid issue bnc#905746 A dracut_dmraid_use_udev.patch - Taken over from SLE12 A fips_add_aesni-intel.patch - Do not touch /run vs /var/run bnc#922676 D 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch - Update dracut to version 042 Remove these already included or unneeded patches: D dracut_v041_to_HEAD.patch D 0011-Correct-paths-for-openSUSE.patch D 0068-95fcoe-uefi-Test-for-EFI-firmware.patch D 0170-enable-logitech-hidpp.patch Adjust/refresh: M 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch M 0016-Add-new-s390x-specific-rule-files.patch M 0017-45ifcfg-use-distro-specific-scripts.patch M 0019-40network-Fix-race-condition-when-wait-for-networks.patch M 0020-00warpclock-Set-correct-timezone.patch M 0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch M 0048-40network-Only-enable-network-interfaces-if-explicit.patch M 0053-01fips-fixup-loading-issues.patch M 0056-81cio_ignore-handle-cio_ignore-commandline.patch M 0057-01fips-Include-some-more-hmacs.patch M 0058-dracut-add-warning-when-including-unsupported-module.patch M 0059-99suse-Add-SUSE-specific-initrd-parsing.patch M 0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch M 0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch M 0066-40network-always-start-netroot-in-ifup.sh.patch M 0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch M 0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch OBS-URL: https://build.opensuse.org/request/show/314510 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=219
90 lines
3.8 KiB
Diff
90 lines
3.8 KiB
Diff
From de870b8879974927873264010b6294a70b6c7980 Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Thu, 17 Jul 2014 14:09:28 +0200
|
|
Subject: 40network: Update iBFT scanning code to handle IPv6
|
|
|
|
IPv6 addresses should be specified in brackets so that the
|
|
ip= scanning code doesn't get confused.
|
|
|
|
References: bnc#887542
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
modules.d/40network/net-lib.sh | 48 +++++++++++++++++++++++++++++++++++++-----
|
|
1 file changed, 43 insertions(+), 5 deletions(-)
|
|
|
|
Index: dracut-042/modules.d/40network/net-lib.sh
|
|
===================================================================
|
|
--- dracut-042.orig/modules.d/40network/net-lib.sh 2015-06-11 17:39:47.000000000 +0200
|
|
+++ dracut-042/modules.d/40network/net-lib.sh 2015-06-24 18:02:22.802137185 +0200
|
|
@@ -213,20 +213,51 @@ ibft_to_cmdline() {
|
|
|
|
[ -e /tmp/net.${dev}.has_ibft_config ] && continue
|
|
|
|
+ [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
|
|
+ # Skip invalid interfaces
|
|
+ (( $flags & 1 )) || continue
|
|
+ # Skip interfaces not used for booting
|
|
+ (( $flags & 2 )) || continue
|
|
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
|
|
+ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a)
|
|
+ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
|
|
|
|
- if [ -n "$dhcp" ]; then
|
|
- echo "ip=$dev:dhcp"
|
|
+ if [ -n "$ip" ] ; then
|
|
+ case "$ip" in
|
|
+ *.*.*.*)
|
|
+ family=ipv4
|
|
+ ;;
|
|
+ *:*)
|
|
+ family=ipv6
|
|
+ ;;
|
|
+ esac
|
|
+ fi
|
|
+ if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then
|
|
+ if [ "$family" = "ipv6" ] ; then
|
|
+ echo "ip=$dev:dhcp6"
|
|
+ else
|
|
+ echo "ip=$dev:dhcp"
|
|
+ fi
|
|
elif [ -e ${iface}/ip-addr ]; then
|
|
- [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
|
|
# skip not assigned ip adresses
|
|
[ "$ip" = "0.0.0.0" ] && continue
|
|
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
|
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
|
+ [ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a)
|
|
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
|
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
|
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
|
- if [ -n "$ip" ] && [ -n "$mask" ]; then
|
|
+ if [ "$family" = "ipv6" ] ; then
|
|
+ if [ -n "$ip" ] ; then
|
|
+ [ -n "$prefix" ] || prefix=64
|
|
+ ip="[${ip}/${prefix}]"
|
|
+ mask=
|
|
+ fi
|
|
+ if [ -n "$gw" ] ; then
|
|
+ gw="[${gw}]"
|
|
+ fi
|
|
+ fi
|
|
+ if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then
|
|
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
|
|
else
|
|
warn "${iface} does not contain a valid iBFT configuration"
|
|
@@ -405,6 +436,13 @@ ip_to_var() {
|
|
esac
|
|
;;
|
|
esac
|
|
+ # Extract prefix length from CIDR notation
|
|
+ case $ip in
|
|
+ */*)
|
|
+ mask=${ip##*/}
|
|
+ ip=${ip%/*}
|
|
+ ;;
|
|
+ esac
|
|
|
|
# ip=<ipv4-address> means anaconda-style static config argument cluster:
|
|
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
|