forked from pool/libguestfs
Olaf Hering
88d5860b72
reduce build-compare noise OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=328
100 lines
3.0 KiB
Diff
100 lines
3.0 KiB
Diff
---
|
|
mkinitrd/scripts/setup-ibft.sh | 2 +-
|
|
mkinitrd/scripts/setup-network.sh | 11 ++++++++++-
|
|
mkinitrd/scripts/setup-scsi_dh.sh | 2 +-
|
|
3 files changed, 12 insertions(+), 3 deletions(-)
|
|
|
|
Index: 1310/mkinitrd/scripts/setup-ibft.sh
|
|
===================================================================
|
|
--- 1310.orig/mkinitrd/scripts/setup-ibft.sh
|
|
+++ 1310/mkinitrd/scripts/setup-ibft.sh
|
|
@@ -21,22 +21,22 @@ ibft_set_iface() {
|
|
interface=$iface
|
|
drvlink=$(get_network_module $interface)
|
|
if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then
|
|
nettype=dhcp
|
|
read ibft_dhcp < $ibft_nic/dhcp
|
|
[ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static
|
|
else
|
|
nettype=static
|
|
fi
|
|
fi
|
|
}
|
|
|
|
ibft_nic=/sys/firmware/ibft/ethernet0
|
|
-ibft_hostname=$(hostname)
|
|
+ibft_hostname=localhost
|
|
|
|
if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then
|
|
ibft_available=1
|
|
ibft_set_iface
|
|
fi
|
|
save_var ibft_available
|
|
save_var ibft_hostname
|
|
save_var ibft_nic
|
|
Index: 1310/mkinitrd/scripts/setup-network.sh
|
|
===================================================================
|
|
--- 1310.orig/mkinitrd/scripts/setup-network.sh
|
|
+++ 1310/mkinitrd/scripts/setup-network.sh
|
|
@@ -278,27 +278,36 @@ if [ "$nettype" = "ifup" ] ; then
|
|
verbose "[NETWORK]\tifup: $interface"
|
|
fi
|
|
done
|
|
interface=
|
|
fi
|
|
|
|
# Copy the /etc/resolv.conf when the IP is static
|
|
if test -n "$static_interfaces"; then
|
|
verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
|
|
cp /etc/resolv.conf $tmp_mnt/etc
|
|
fi
|
|
|
|
# Copy netcfg files (bnc#468090, bnc#714945)
|
|
-cp /etc/{hosts,protocols,services,netconfig} $tmp_mnt/etc
|
|
+cp /etc/{protocols,services,netconfig} $tmp_mnt/etc
|
|
+cat > $tmp_mnt/etc/hosts <<_EOH_
|
|
+127.0.0.1 localhost
|
|
+::1 localhost ipv6-localhost ipv6-loopback
|
|
+fe00::0 ipv6-localnet
|
|
+ff00::0 ipv6-mcastprefix
|
|
+ff02::1 ipv6-allnodes
|
|
+ff02::2 ipv6-allrouters
|
|
+ff02::3 ipv6-allhosts
|
|
+_EOH_
|
|
|
|
# Get static IP configuration if requested
|
|
for iface in $static_interfaces; do
|
|
static_ips="$static_ips $(get_ip_config $iface)"
|
|
done
|
|
|
|
mkdir -p $tmp_mnt/var/lib/dhcpcd
|
|
mkdir -p $tmp_mnt/var/run
|
|
|
|
cp_bin /lib/mkinitrd/bin/ipconfig $tmp_mnt/bin/ipconfig
|
|
if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
|
|
cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
|
|
fi
|
|
Index: 1310/mkinitrd/scripts/setup-scsi_dh.sh
|
|
===================================================================
|
|
--- 1310.orig/mkinitrd/scripts/setup-scsi_dh.sh
|
|
+++ 1310/mkinitrd/scripts/setup-scsi_dh.sh
|
|
@@ -1,17 +1,17 @@
|
|
#!/bin/bash
|
|
#
|
|
#%stage: device
|
|
#
|
|
# Include all scsi_dh_* modules and load them on boot (bnc#727428 et al)
|
|
|
|
scsi_dh_modules=
|
|
if test -d $root_dir/lib/modules/$kernel_version/kernel/drivers/scsi/device_handler
|
|
then
|
|
- for i in $(find $root_dir/lib/modules/$kernel_version/kernel/drivers/scsi/device_handler -name "scsi[-_]dh[_-]*.ko")
|
|
+ for i in $(find $root_dir/lib/modules/$kernel_version/kernel/drivers/scsi/device_handler -name "scsi[-_]dh[_-]*.ko" | sort)
|
|
do
|
|
i=${i%.ko}
|
|
scsi_dh_modules="$scsi_dh_modules ${i##*/}"
|
|
done
|
|
fi
|
|
|
|
save_var scsi_dh_modules
|