Accepting request 229484 from home:hreinecke:branches:Base:System

- Update dracut to 037
  * Add --hostonly_cmdline switch
  * Update --mount syntax
  * Include modules from /updates directory
  * Fixes for network setup
  * Some small fixes
- Rediff patches
- Include iscsiuio again (bnc#872474)
  Remove: remove-iscsiuio.patch
- Install 59-scsi-sg_utils.rules (bnc#872478)
  Add: 0015-95udev-rules-Add-59-scsi-sg_utils.rules.patch
- Install 67-kpartx-compat.rules (bnc#872662)
  Add: 0016-90multipath-add-67-kpartx-compat.rules.patch
- Install separate multipath service file (bnc#871610)
  Add: 0017-90multipath-install-dracut-specific-service-file.patch
- Do not fsck and mount from fstab if systemd is used (bnc#
  Add: 0018-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch
- Fixup initqueue for remote-fs
  Add: 0019-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch

OBS-URL: https://build.opensuse.org/request/show/229484
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=124
This commit is contained in:
Shawn Dunn 2014-04-09 12:44:32 +00:00 committed by Git OBS Bridge
parent 3d16553b07
commit 7955a4d13a
26 changed files with 968 additions and 514 deletions

View File

@ -1,4 +1,4 @@
From 9e87dcb25f82122be3ee16ca8f3c198dd3d02d77 Mon Sep 17 00:00:00 2001
From e147bd71656fb48c10520cad98b56f6355270afd Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 27 Nov 2013 14:35:19 +0100
Subject: [PATCH] Install /bin/mount

View File

@ -1,4 +1,4 @@
From 16b73ffc6f9c67800811f39641c484123d2a159a Mon Sep 17 00:00:00 2001
From 5887b84912c9eb3df2e40489ae66e1eca749ebb8 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 28 Nov 2013 10:07:59 +0100
Subject: [PATCH] Correct paths for openSUSE
@ -14,11 +14,11 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
modules.d/98systemd/rescue.service | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
Index: dracut-034/dracut.sh
===================================================================
--- dracut-034.orig/dracut.sh
+++ dracut-034/dracut.sh
@@ -683,7 +683,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l
diff --git a/dracut.sh b/dracut.sh
index c1ef474..dddb488 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -774,7 +774,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
[[ $lvmconf_l ]] && lvmconf=$lvmconf_l
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
@ -27,11 +27,11 @@ Index: dracut-034/dracut.sh
[[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
[[ $tmpdir ]] || tmpdir=/var/tmp
[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
Index: dracut-034/modules.d/10i18n/module-setup.sh
===================================================================
--- dracut-034.orig/modules.d/10i18n/module-setup.sh
+++ dracut-034/modules.d/10i18n/module-setup.sh
@@ -98,6 +98,8 @@ install() {
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index a091f89..92b2fa3 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -96,6 +96,8 @@ install() {
install_base() {
inst_multiple setfont loadkeys kbd_mode stty
@ -40,10 +40,10 @@ Index: dracut-034/modules.d/10i18n/module-setup.sh
if ! dracut_module_included "systemd"; then
inst ${moddir}/console_init.sh /lib/udev/console_init
Index: dracut-034/modules.d/98systemd/rescue.service
===================================================================
--- dracut-034.orig/modules.d/98systemd/rescue.service
+++ dracut-034/modules.d/98systemd/rescue.service
diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service
index edc2461..d80900f 100644
--- a/modules.d/98systemd/rescue.service
+++ b/modules.d/98systemd/rescue.service
@@ -16,7 +16,7 @@ Environment=HOME=/
Environment=DRACUT_SYSTEMD=1
Environment=NEWROOT=/sysroot
@ -53,3 +53,6 @@ Index: dracut-034/modules.d/98systemd/rescue.service
ExecStart=-/bin/sh -i -l
ExecStopPost=-/bin/rm -f -- /.console_lock
ExecStopPost=-/usr/bin/systemctl --fail --no-block default
--
1.8.1.4

View File

@ -1,4 +1,4 @@
From cc0ec0cdcef806efe2315931ba4705fb35b82c6a Mon Sep 17 00:00:00 2001
From ab0a60b5a9c7c747400f458ae4a632b2d88fe2e1 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 27 Nov 2013 15:54:00 +0100
Subject: [PATCH] Check for plymouth lib directories
@ -12,7 +12,7 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index 1360924..7ccf9e4 100755
index b818324..86a68fe 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -15,12 +15,19 @@ depends() {

View File

@ -0,0 +1,31 @@
From 21705c28104c5c8153b6e992908cf999d4cf0983 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 8 Apr 2014 09:51:14 +0200
Subject: [PATCH] 95udev-rules: Add 59-scsi-sg_utils.rules
Add udev rules from sg3_utils to provide persistent device links.
References: bnc#872478
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95udev-rules/module-setup.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index f02b59e..d63066f 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -27,7 +27,8 @@ install() {
exit 1
fi
- inst_rules 50-udev-default.rules 60-persistent-storage.rules \
+ inst_rules 50-udev-default.rules 59-scsi-sg3_utils.rules \
+ 60-persistent-storage.rules \
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \
60-pcmcia.rules \
50-udev.rules 95-late.rules \
--
1.8.1.4

View File

@ -1,4 +1,4 @@
From 9b76077d6e70d1ae37273a587277ccef467e698b Mon Sep 17 00:00:00 2001
From 7995f23a106e28afa0204b5eca68671cb514b1d9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 21 Jan 2014 14:32:09 +0100
Subject: [PATCH] Add new s390x-specific rule files
@ -10,20 +10,25 @@ to be compatible with existing and new installations.
References: bnc#856585
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95dasd_rules/module-setup.sh | 4 ++--
modules.d/95zfcp_rules/module-setup.sh | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh
index d313171..78ab2d0 100755
index 51c315d..451fc25 100755
--- a/modules.d/95dasd_rules/module-setup.sh
+++ b/modules.d/95dasd_rules/module-setup.sh
@@ -5,7 +5,6 @@
# called by dracut
@@ -6,7 +6,7 @@
check() {
local _arch=$(uname -m)
- [ -x /sbin/dasd_configure ] || return 1
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
- require_binaries dasd_configure /usr/lib/udev/collect || return 1
+ require_binaries /usr/lib/udev/collect || return 1
return 0
}
@@ -18,10 +17,10 @@ depends() {
@@ -18,10 +18,10 @@ depends() {
# called by dracut
install() {
@ -36,7 +41,7 @@ index d313171..78ab2d0 100755
inst_rules 59-dasd.rules
}
diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh
index 9a1ab20..40c62a1 100755
index d9879cb..849645c 100755
--- a/modules.d/95zfcp_rules/module-setup.sh
+++ b/modules.d/95zfcp_rules/module-setup.sh
@@ -21,5 +21,6 @@ install() {
@ -46,3 +51,6 @@ index 9a1ab20..40c62a1 100755
+ inst_rules_wildcard 41-s390x-zfcp-*.rules
fi
}
--
1.8.1.4

View File

@ -0,0 +1,31 @@
From 8b76d2e8d7f2dbc6e6020c5f030a697d8f9005f9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 9 Apr 2014 08:07:39 +0200
Subject: [PATCH] 90multipath: add 67-kpartx-compat.rules
Dracut needs to install the kpartx compability rules, otherwise
random failures might occur during boot.
References: bnc#872662
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/90multipath/module-setup.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index b60cc60..c2bbdb4 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -102,6 +102,7 @@ install() {
inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
- inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules 66-kpartx.rules
+ inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules \
+ 66-kpartx.rules 67-kpartx-compat.rules
}
--
1.8.1.4

View File

@ -0,0 +1,61 @@
From 985b280a49b90f0daa3e7b0a142099ae829efe12 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 8 Apr 2014 10:04:41 +0200
Subject: [PATCH] 90multipath: install dracut-specific service file
The multipathd package might install a service and a socket
file. Using the original service file from the installed
system without the socket file triggers a bug in systemd,
causing systemd to crash.
As we don't actually need to socket file in the initrd we
should be installing our own service file which does not
reference the socket file at all.
References: bnc#871610
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/90multipath/module-setup.sh | 3 +--
modules.d/90multipath/multipathd.service | 15 +++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 modules.d/90multipath/multipathd.service
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index c2bbdb4..9715851 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -91,8 +91,7 @@ install() {
inst_libdir_file "libmultipath*" "multipath/*"
if dracut_module_included "systemd"; then
- inst_multiple \
- $systemdsystemunitdir/multipathd.service
+ inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
mkdir -p "${initdir}${systemdsystemconfdir}/sysinit.target.wants"
ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemconfdir}/sysinit.target.wants/multipathd.service"
else
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
new file mode 100644
index 0000000..01e497c
--- /dev/null
+++ b/modules.d/90multipath/multipathd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Device-Mapper Multipath Device Controller
+Before=iscsi.service iscsid.service lvm2-activation-early.service
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=forking
+ExecStartPre=/sbin/modprobe dm-multipath
+ExecStart=/sbin/multipathd
+ExecReload=/sbin/multipathd reconfigure
+ExecStop=/sbin/multipathd shutdown
+
+[Install]
+WantedBy=sysinit.target
--
1.8.1.4

View File

@ -0,0 +1,39 @@
From 88ed5bf13a56f9397cc50eb329785553eb82c210 Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Tue, 1 Apr 2014 15:20:49 +0800
Subject: [PATCH] fstab: do not mount and fsck from fstab if using systemd
If using systemd in initramfs, we could run into a race condition when
dracut and systemd both are trying to mount and run fsck for the same
filesystem, and mount or fsck could be a failure.
To fix such failure, we should use systemd to mount/fsck from /etc/fstab
only.
v2: check $DRACUT_SYSTEMD suggested by Alexander Tsoy
Signed-off-by: WANG Chao <chaowang@redhat.com>
---
modules.d/95fstab-sys/mount-sys.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh
index 12711a0..a237810 100755
--- a/modules.d/95fstab-sys/mount-sys.sh
+++ b/modules.d/95fstab-sys/mount-sys.sh
@@ -27,7 +27,11 @@ fstab_mount() {
return 0
}
-[ -f /etc/fstab ] && fstab_mount /etc/fstab
+# systemd will mount and run fsck from /etc/fstab and we don't want to
+# run into a race condition.
+if [ -z "$DRACUT_SYSTEMD" ]; then
+ [ -f /etc/fstab ] && fstab_mount /etc/fstab
+fi
# prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys
if [ -f $NEWROOT/etc/fstab.sys ]; then
--
1.8.1.4

View File

@ -0,0 +1,40 @@
From c0bd4752731644ac799a7aa3d6e20069f94875bd Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Thu, 3 Apr 2014 15:49:26 +0800
Subject: [PATCH] dracut-initqueue service runs before remote-fs-pre.target
With the following commit, dracut doesn't mount anything from /etc/fstab
commit e920bfb
Author: WANG Chao <chaowang@redhat.com>
Date: Tue Apr 1 15:20:49 2014 +0800
fstab: do not mount and fsck from fstab if using systemd
But systemd doesn't mount nfs at all, because no unit is pulling in
remote-fs.target.
dracut must pull in these remote fs mount and all these remote mounts
should start only after network is up (ie. after dracut-initqueue).
Signed-off-by: WANG Chao <chaowang@redhat.com>
---
modules.d/98systemd/dracut-initqueue.service | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
index 03dcc4e..1b9e701 100644
--- a/modules.d/98systemd/dracut-initqueue.service
+++ b/modules.d/98systemd/dracut-initqueue.service
@@ -11,6 +11,8 @@
Description=dracut initqueue hook
Documentation=man:dracut-initqueue.service(8)
DefaultDependencies=no
+Before=remote-fs-pre.target
+Wants=remote-fs-pre.target
After=systemd-udev-trigger.service
Wants=systemd-udev-trigger.service
ConditionPathExists=/etc/initrd-release
--
1.8.1.4

View File

@ -1,7 +1,38 @@
Index: dracut-036/modules.d/45ifcfg/module-setup.sh
===================================================================
--- dracut-036.orig/modules.d/45ifcfg/module-setup.sh 2014-03-04 18:09:39.084659676 +0100
+++ dracut-036/modules.d/45ifcfg/module-setup.sh 2014-03-04 18:10:43.641663629 +0100
From dc3ce2b641e458c0030476ebdd0bb86783dd98e4 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
Date: Tue, 8 Apr 2014 08:48:27 +0200
Subject: [PATCH] 45ifcfg: use distro-specific scripts
Detect the system flavor and write the ifcfg files accordingly.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/40network/ifup.sh | 1 +
modules.d/45ifcfg/module-setup.sh | 8 +-
modules.d/45ifcfg/write-ifcfg-redhat.sh | 271 ++++++++++++++++++++++++++++++++
modules.d/45ifcfg/write-ifcfg-suse.sh | 183 +++++++++++++++++++++
modules.d/45ifcfg/write-ifcfg.sh | 271 --------------------------------
5 files changed, 462 insertions(+), 272 deletions(-)
create mode 100755 modules.d/45ifcfg/write-ifcfg-redhat.sh
create mode 100755 modules.d/45ifcfg/write-ifcfg-suse.sh
delete mode 100755 modules.d/45ifcfg/write-ifcfg.sh
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 25ce094..65f5f4c 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -186,6 +186,7 @@ do_dhcp() {
$dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
dhcp_apply $1 || return $?
+ echo $netif > /tmp/net.${netif}.did-setup
echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh
index c407f45..164a580 100755
--- a/modules.d/45ifcfg/module-setup.sh
+++ b/modules.d/45ifcfg/module-setup.sh
@@ -4,7 +4,13 @@
# called by dracut
@ -17,286 +48,12 @@ Index: dracut-036/modules.d/45ifcfg/module-setup.sh
return 255
}
Index: dracut-036/modules.d/45ifcfg/write-ifcfg.sh
===================================================================
--- dracut-036.orig/modules.d/45ifcfg/write-ifcfg.sh 2014-03-04 18:09:39.084659676 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,270 +0,0 @@
-#!/bin/sh
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-# NFS root might have reached here before /tmp/net.ifaces was written
-udevadm settle --timeout=30
-
-if [ -e /tmp/bridge.info ]; then
- . /tmp/bridge.info
-fi
-
-if [ -e /tmp/vlan.info ]; then
- . /tmp/vlan.info
-fi
-
-mkdir -m 0755 -p /tmp/ifcfg/
-mkdir -m 0755 -p /tmp/ifcfg-leases/
-
-get_config_line_by_subchannel()
-{
- local CHANNEL
- local line
-
- CHANNELS="$1"
- while read line; do
- if strstr "$line" "$CHANNELS"; then
- echo $line
- return 0
- fi
- done < /etc/ccw.conf
- return 1
-}
-
-print_s390() {
- local _netif
- local SUBCHANNELS
- local OPTIONS
- local NETTYPE
- local CONFIG_LINE
- local i
- local channel
- local OLD_IFS
-
- _netif="$1"
- # if we find ccw channel, then use those, instead of
- # of the MAC
- SUBCHANNELS=$({
- for i in /sys/class/net/$_netif/device/cdev[0-9]*; do
- [ -e $i ] || continue
- channel=$(readlink -f $i)
- echo -n "${channel##*/},"
- done
- })
- [ -n "$SUBCHANNELS" ] || return 1
-
- SUBCHANNELS=${SUBCHANNELS%,}
- echo "SUBCHANNELS=\"${SUBCHANNELS}\""
- CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS)
-
- [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return
-
- OLD_IFS=$IFS
- IFS=","
- set -- $CONFIG_LINE
- IFS=$OLD_IFS
- NETTYPE=$1
- shift
- SUBCHANNELS="$1"
- OPTIONS=""
- shift
- while [ $# -gt 0 ]; do
- case $1 in
- *=*) OPTIONS="$OPTIONS $1";;
- esac
- shift
- done
- OPTIONS=${OPTIONS## }
- echo "NETTYPE=\"${NETTYPE}\""
- echo "OPTIONS=\"${OPTIONS}\""
-}
-
-for netup in /tmp/net.*.did-setup ; do
- [ -f $netup ] || continue
-
- netif=${netup%%.did-setup}
- netif=${netif##*/net.}
- [ -e /tmp/ifcfg/ifcfg-$netif ] && continue
- unset bridge
- unset bond
- unset bondslaves
- unset bondname
- unset bondoptions
- unset uuid
- unset ip
- unset gw
- unset mtu
- unset mask
- unset macaddr
- unset slave
- unset ethname
- [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
-
- uuid=$(cat /proc/sys/kernel/random/uuid)
- if [ "$netif" = "$bridgename" ]; then
- bridge=yes
- elif [ "$netif" = "$bondname" ]; then
- # $netif can't be bridge and bond at the same time
- bond=yes
- fi
- if [ "$netif" = "$vlanname" ]; then
- vlan=yes
- fi
- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$netif\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "UUID=\"$uuid\""
- if [ -f /tmp/dhclient.$netif.lease ]; then
- [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
- strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
- if [ -f /tmp/net.$netif.has_ibft_config ]; then
- echo "BOOTPROTO=ibft"
- else
- echo "BOOTPROTO=dhcp"
- fi
- cp /tmp/dhclient.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease
- else
- # If we've booted with static ip= lines, the override file is there
- [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
- if strstr "$ip" '*:*:*'; then
- echo "IPV6INIT=yes"
- echo "IPV6_AUTOCONF=no"
- echo "IPV6ADDR=\"$ip/$mask\""
- else
- if [ -f /tmp/net.$netif.has_ibft_config ]; then
- echo "BOOTPROTO=ibft"
- else
- echo "BOOTPROTO=none"
- echo "IPADDR=\"$ip\""
- if strstr "$mask" "."; then
- echo "NETMASK=\"$mask\""
- else
- echo "PREFIX=\"$mask\""
- fi
- fi
- fi
- if strstr "$gw" '*:*:*'; then
- echo "IPV6_DEFAULTGW=\"$gw\""
- elif [ -n "$gw" ]; then
- echo "GATEWAY=\"$gw\""
- fi
- fi
- [ -n "$mtu" ] && echo "MTU=\"$mtu\""
- } > /tmp/ifcfg/ifcfg-$netif
-
- # bridge needs different things written to ifcfg
- if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then
- # standard interface
- {
- if [ -n "$macaddr" ]; then
- echo "MACADDR=\"$macaddr\""
- else
- echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
- fi
- print_s390 $netif
- echo "TYPE=Ethernet"
- echo "NAME=\"$netif\""
- [ -n "$mtu" ] && echo "MTU=\"$mtu\""
- } >> /tmp/ifcfg/ifcfg-$netif
- fi
-
- if [ -n "$vlan" ] ; then
- {
- echo "TYPE=Vlan"
- echo "NAME=\"$netif\""
- echo "VLAN=yes"
- echo "PHYSDEV=\"$phydevice\""
- } >> /tmp/ifcfg/ifcfg-$netif
- fi
-
- if [ -n "$bond" ] ; then
- # bond interface
- {
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "NAME=\"$netif\""
- echo "TYPE=Bond"
- } >> /tmp/ifcfg/ifcfg-$netif
-
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$netif\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- fi
-
- if [ -n "$bridge" ] ; then
- # bridge
- {
- echo "TYPE=Bridge"
- echo "NAME=\"$netif\""
- } >> /tmp/ifcfg/ifcfg-$netif
- if [ "$ethname" = "$bondname" ] ; then
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$bondname\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$bondname\""
- } >> /tmp/ifcfg/ifcfg-$bondname
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bondname\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- else
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$ethname\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$ethname\""
- } >> /tmp/ifcfg/ifcfg-$ethname
- fi
- fi
- i=1
- for ns in $(getargs nameserver); do
- echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
- i=$((i+1))
- done
-done
-
-# Pass network opts
-mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts
-mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient
-echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab
-echo "files /var/lib/dhclient" >> /run/initramfs/rwtab
-{
- cp /tmp/net.* /run/initramfs/
- cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf
- copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts
- cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient
-} > /dev/null 2>&1
Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh 2014-03-04 18:10:43.643663629 +0100
@@ -0,0 +1,270 @@
diff --git a/modules.d/45ifcfg/write-ifcfg-redhat.sh b/modules.d/45ifcfg/write-ifcfg-redhat.sh
new file mode 100755
index 0000000..e2fa485
--- /dev/null
+++ b/modules.d/45ifcfg/write-ifcfg-redhat.sh
@@ -0,0 +1,271 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
@ -354,9 +111,9 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+
+ SUBCHANNELS=${SUBCHANNELS%,}
+ echo "SUBCHANNELS=\"${SUBCHANNELS}\""
+ CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS)
+
+ [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return
+ CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS)
+ [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return 0
+
+ OLD_IFS=$IFS
+ IFS=","
@ -376,6 +133,7 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+ OPTIONS=${OPTIONS## }
+ echo "NETTYPE=\"${NETTYPE}\""
+ echo "OPTIONS=\"${OPTIONS}\""
+ return 0
+}
+
+for netup in /tmp/net.*.did-setup ; do
@ -383,6 +141,7 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+
+ netif=${netup%%.did-setup}
+ netif=${netif##*/net.}
+ strstr "$netif" ":*:*:*:*:" && continue
+ [ -e /tmp/ifcfg/ifcfg-$netif ] && continue
+ unset bridge
+ unset bond
@ -409,7 +168,8 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+ if [ "$netif" = "$vlanname" ]; then
+ vlan=yes
+ fi
+ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
+ [ -e /sys/class/net/$netif/address ] && \
+ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
+ {
+ echo "# Generated by dracut initrd"
+ echo "DEVICE=\"$netif\""
@ -458,12 +218,10 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+ if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then
+ # standard interface
+ {
+ if [ -n "$macaddr" ]; then
+ echo "MACADDR=\"$macaddr\""
+ else
+ echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
+ [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\""
+ if ! print_s390 $netif; then
+ [ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
+ fi
+ print_s390 $netif
+ echo "TYPE=Ethernet"
+ echo "NAME=\"$netif\""
+ [ -n "$mtu" ] && echo "MTU=\"$mtu\""
@ -567,10 +325,11 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-redhat.sh
+ copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts
+ cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient
+} > /dev/null 2>&1
Index: dracut-036/modules.d/45ifcfg/write-ifcfg-suse.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dracut-036/modules.d/45ifcfg/write-ifcfg-suse.sh 2014-03-04 18:10:43.643663629 +0100
diff --git a/modules.d/45ifcfg/write-ifcfg-suse.sh b/modules.d/45ifcfg/write-ifcfg-suse.sh
new file mode 100755
index 0000000..4b6350f
--- /dev/null
+++ b/modules.d/45ifcfg/write-ifcfg-suse.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
@ -755,15 +514,283 @@ Index: dracut-036/modules.d/45ifcfg/write-ifcfg-suse.sh
+ copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network
+ cp /tmp/leaseinfo.* /run/initramfs/state/var/run/wicked/
+} > /dev/null 2>&1
Index: dracut-036/modules.d/40network/ifup.sh
===================================================================
--- dracut-036.orig/modules.d/40network/ifup.sh 2014-03-04 18:10:35.440663127 +0100
+++ dracut-036/modules.d/40network/ifup.sh 2014-03-04 18:11:02.536664786 +0100
@@ -175,6 +175,7 @@ do_dhcp() {
$dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
dhcp_apply $1 || return $?
+ echo $netif > /tmp/net.${netif}.did-setup
echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
deleted file mode 100755
index e2fa485..0000000
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ /dev/null
@@ -1,271 +0,0 @@
-#!/bin/sh
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-# NFS root might have reached here before /tmp/net.ifaces was written
-udevadm settle --timeout=30
-
-if [ -e /tmp/bridge.info ]; then
- . /tmp/bridge.info
-fi
-
-if [ -e /tmp/vlan.info ]; then
- . /tmp/vlan.info
-fi
-
-mkdir -m 0755 -p /tmp/ifcfg/
-mkdir -m 0755 -p /tmp/ifcfg-leases/
-
-get_config_line_by_subchannel()
-{
- local CHANNEL
- local line
-
- CHANNELS="$1"
- while read line; do
- if strstr "$line" "$CHANNELS"; then
- echo $line
- return 0
- fi
- done < /etc/ccw.conf
- return 1
-}
-
-print_s390() {
- local _netif
- local SUBCHANNELS
- local OPTIONS
- local NETTYPE
- local CONFIG_LINE
- local i
- local channel
- local OLD_IFS
-
- _netif="$1"
- # if we find ccw channel, then use those, instead of
- # of the MAC
- SUBCHANNELS=$({
- for i in /sys/class/net/$_netif/device/cdev[0-9]*; do
- [ -e $i ] || continue
- channel=$(readlink -f $i)
- echo -n "${channel##*/},"
- done
- })
- [ -n "$SUBCHANNELS" ] || return 1
-
- SUBCHANNELS=${SUBCHANNELS%,}
- echo "SUBCHANNELS=\"${SUBCHANNELS}\""
-
- CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS)
- [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return 0
-
- OLD_IFS=$IFS
- IFS=","
- set -- $CONFIG_LINE
- IFS=$OLD_IFS
- NETTYPE=$1
- shift
- SUBCHANNELS="$1"
- OPTIONS=""
- shift
- while [ $# -gt 0 ]; do
- case $1 in
- *=*) OPTIONS="$OPTIONS $1";;
- esac
- shift
- done
- OPTIONS=${OPTIONS## }
- echo "NETTYPE=\"${NETTYPE}\""
- echo "OPTIONS=\"${OPTIONS}\""
- return 0
-}
-
-for netup in /tmp/net.*.did-setup ; do
- [ -f $netup ] || continue
-
- netif=${netup%%.did-setup}
- netif=${netif##*/net.}
- strstr "$netif" ":*:*:*:*:" && continue
- [ -e /tmp/ifcfg/ifcfg-$netif ] && continue
- unset bridge
- unset bond
- unset bondslaves
- unset bondname
- unset bondoptions
- unset uuid
- unset ip
- unset gw
- unset mtu
- unset mask
- unset macaddr
- unset slave
- unset ethname
- [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
-
- uuid=$(cat /proc/sys/kernel/random/uuid)
- if [ "$netif" = "$bridgename" ]; then
- bridge=yes
- elif [ "$netif" = "$bondname" ]; then
- # $netif can't be bridge and bond at the same time
- bond=yes
- fi
- if [ "$netif" = "$vlanname" ]; then
- vlan=yes
- fi
- [ -e /sys/class/net/$netif/address ] && \
- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$netif\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "UUID=\"$uuid\""
- if [ -f /tmp/dhclient.$netif.lease ]; then
- [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
- strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
- if [ -f /tmp/net.$netif.has_ibft_config ]; then
- echo "BOOTPROTO=ibft"
- else
- echo "BOOTPROTO=dhcp"
- fi
- cp /tmp/dhclient.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease
- else
- # If we've booted with static ip= lines, the override file is there
- [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
- if strstr "$ip" '*:*:*'; then
- echo "IPV6INIT=yes"
- echo "IPV6_AUTOCONF=no"
- echo "IPV6ADDR=\"$ip/$mask\""
- else
- if [ -f /tmp/net.$netif.has_ibft_config ]; then
- echo "BOOTPROTO=ibft"
- else
- echo "BOOTPROTO=none"
- echo "IPADDR=\"$ip\""
- if strstr "$mask" "."; then
- echo "NETMASK=\"$mask\""
- else
- echo "PREFIX=\"$mask\""
- fi
- fi
- fi
- if strstr "$gw" '*:*:*'; then
- echo "IPV6_DEFAULTGW=\"$gw\""
- elif [ -n "$gw" ]; then
- echo "GATEWAY=\"$gw\""
- fi
- fi
- [ -n "$mtu" ] && echo "MTU=\"$mtu\""
- } > /tmp/ifcfg/ifcfg-$netif
-
- # bridge needs different things written to ifcfg
- if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then
- # standard interface
- {
- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\""
- if ! print_s390 $netif; then
- [ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
- fi
- echo "TYPE=Ethernet"
- echo "NAME=\"$netif\""
- [ -n "$mtu" ] && echo "MTU=\"$mtu\""
- } >> /tmp/ifcfg/ifcfg-$netif
- fi
-
- if [ -n "$vlan" ] ; then
- {
- echo "TYPE=Vlan"
- echo "NAME=\"$netif\""
- echo "VLAN=yes"
- echo "PHYSDEV=\"$phydevice\""
- } >> /tmp/ifcfg/ifcfg-$netif
- fi
-
- if [ -n "$bond" ] ; then
- # bond interface
- {
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "NAME=\"$netif\""
- echo "TYPE=Bond"
- } >> /tmp/ifcfg/ifcfg-$netif
-
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$netif\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- fi
-
- if [ -n "$bridge" ] ; then
- # bridge
- {
- echo "TYPE=Bridge"
- echo "NAME=\"$netif\""
- } >> /tmp/ifcfg/ifcfg-$netif
- if [ "$ethname" = "$bondname" ] ; then
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$bondname\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$bondname\""
- } >> /tmp/ifcfg/ifcfg-$bondname
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bondname\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- else
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$ethname\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$ethname\""
- } >> /tmp/ifcfg/ifcfg-$ethname
- fi
- fi
- i=1
- for ns in $(getargs nameserver); do
- echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
- i=$((i+1))
- done
-done
-
-# Pass network opts
-mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts
-mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient
-echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab
-echo "files /var/lib/dhclient" >> /run/initramfs/rwtab
-{
- cp /tmp/net.* /run/initramfs/
- cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf
- copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts
- cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient
-} > /dev/null 2>&1
--
1.8.1.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6dd97c4323ec8bd87b24a95349692fb6c6ca2d1b3528793ef117820049b6fcd3
size 255192

3
dracut-037.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:284e7856a331034414c669633bbc1756408bd249dce6771b19e97c29b6b9ed64
size 230904

View File

@ -1,7 +1,17 @@
Index: dracut-036/mkinitrd-suse.sh
===================================================================
--- dracut-036.orig/mkinitrd-suse.sh
+++ dracut-036/mkinitrd-suse.sh
From 942274be37437eefad4ebebae40af43d7bd336b6 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 8 Apr 2014 08:49:53 +0200
Subject: [PATCH] mkinitrd-suse: Fix whitespaces when adding drivers
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
mkinitrd-suse.sh | 49 +++++++++++++++++++++++++------------------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh
index b31ea36..1c2634f 100755
--- a/mkinitrd-suse.sh
+++ b/mkinitrd-suse.sh
@@ -70,10 +70,7 @@ usage () {
$cmd " -j device Journal device"
$cmd " -D interface Run dhcp on the specified interface."
@ -28,7 +38,7 @@ Index: dracut-036/mkinitrd-suse.sh
for ((i=0 ; $i<${#targets[@]} ; i++)); do
if [[ $img_vers ]];then
@@ -324,28 +320,33 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); d
@@ -324,28 +320,33 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do
fi
kernel="${kernels[$i]}"
@ -79,3 +89,6 @@ Index: dracut-036/mkinitrd-suse.sh
fi
done
--
1.8.1.4

View File

@ -1,12 +1,29 @@
Index: dracut-036/modules.d/95udev-rules/module-setup.sh
===================================================================
--- dracut-036.orig/modules.d/95udev-rules/module-setup.sh
+++ dracut-036/modules.d/95udev-rules/module-setup.sh
From 765d1d5be81da52c7a91d1aa3fc661d1d5819fbf Mon Sep 17 00:00:00 2001
From: Robert Milasan <rmilasan@suse.cz>
Date: Tue, 8 Apr 2014 08:54:42 +0200
Subject: [PATCH] 95udev-rules: add persistent network rule
Add support for 70-persistent-net.rules in dracut.
References: bnc#868375
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95udev-rules/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index 2d36712..f02b59e 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -32,6 +32,7 @@ install() {
60-pcmcia.rules \
50-udev.rules 95-late.rules \
50-firmware.rules \
+ 70-persistent-net.rules \
75-net-description.rules 80-net-name-slot.rules \
75-net-description.rules \
80-net-name-slot.rules 80-net-setup-link.rules \
"$moddir/59-persistent-storage.rules" \
"$moddir/61-persistent-storage.rules"
--
1.8.1.4

View File

@ -1,7 +1,23 @@
Index: dracut-036/modules.d/98systemd/module-setup.sh
===================================================================
--- dracut-036.orig/modules.d/98systemd/module-setup.sh
+++ dracut-036/modules.d/98systemd/module-setup.sh
From d710d4f00e23b910f3e280b78821d1d618d4654d Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 9 Apr 2014 14:10:57 +0200
Subject: [PATCH] systemd always tries to load autofs4
During boot systemd tries to load autofs4, but dracut will only
add it if it's loaded by the time dracut is run.
Modify dracut to always load autofs4.
References: bnc#869411
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
modules.d/98systemd/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index c72aad4..23bc1f8 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -20,7 +20,7 @@ depends() {
}
@ -11,3 +27,6 @@ Index: dracut-036/modules.d/98systemd/module-setup.sh
}
# called by dracut
--
1.8.1.4

View File

@ -1,17 +1,26 @@
From bb18c6dea7727d32191fbc40c504bc1f52bcf9c3 Mon Sep 17 00:00:00 2001
From 8792c2c46d3841ea11b9bd30e388eaeb64549fdc Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 5 Dec 2013 09:29:28 +0100
Subject: [PATCH] 00warpclock: Set correct timezone
Add module for setting correct timezone.
Signed-off-by: Hannes Reinecke <hare@suse.de>
References: bnc#830060
Index: dracut-036/modules.d/00warpclock/module-setup.sh
===================================================================
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/00warpclock/module-setup.sh | 22 ++++++++++++++++++++++
modules.d/00warpclock/warpclock.sh | 9 +++++++++
2 files changed, 31 insertions(+)
create mode 100755 modules.d/00warpclock/module-setup.sh
create mode 100755 modules.d/00warpclock/warpclock.sh
diff --git a/modules.d/00warpclock/module-setup.sh b/modules.d/00warpclock/module-setup.sh
new file mode 100755
index 0000000..4d18795
--- /dev/null
+++ dracut-036/modules.d/00warpclock/module-setup.sh
@@ -0,0 +1,23 @@
+++ b/modules.d/00warpclock/module-setup.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
@ -34,11 +43,11 @@ Index: dracut-036/modules.d/00warpclock/module-setup.sh
+ inst_hook pre-trigger 00 "$moddir/warpclock.sh"
+ inst /sbin/hwclock
+}
+
Index: dracut-036/modules.d/00warpclock/warpclock.sh
===================================================================
diff --git a/modules.d/00warpclock/warpclock.sh b/modules.d/00warpclock/warpclock.sh
new file mode 100755
index 0000000..f64818c
--- /dev/null
+++ dracut-036/modules.d/00warpclock/warpclock.sh
+++ b/modules.d/00warpclock/warpclock.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
@ -49,3 +58,6 @@ Index: dracut-036/modules.d/00warpclock/warpclock.sh
+ fi
+ done < /etc/adjtime
+fi
--
1.8.1.4

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Apr 8 10:16:16 CEST 2014 - hare@suse.de
- Update dracut to 037
* Add --hostonly_cmdline switch
* Update --mount syntax
* Include modules from /updates directory
* Fixes for network setup
* Some small fixes
- Rediff patches
- Include iscsiuio again (bnc#872474)
Remove: remove-iscsiuio.patch
- Install 59-scsi-sg_utils.rules (bnc#872478)
Add: 0015-95udev-rules-Add-59-scsi-sg_utils.rules.patch
- Install 67-kpartx-compat.rules (bnc#872662)
Add: 0016-90multipath-add-67-kpartx-compat.rules.patch
- Install separate multipath service file (bnc#871610)
Add: 0017-90multipath-install-dracut-specific-service-file.patch
- Do not fsck and mount from fstab if systemd is used (bnc#
Add: 0018-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch
- Fixup initqueue for remote-fs
Add: 0019-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch
-------------------------------------------------------------------
Thu Apr 3 23:59:31 UTC 2014 - crrodriguez@opensuse.org
@ -26,6 +49,7 @@ Fri Mar 28 17:39:08 UTC 2014 - trenn@suse.de
dracut already adds it, but only if loaded already.
Always load autofs4 even if not already loaded (bnc#869411)
Add: dracut-really-always-add-autofs4.patch
-------------------------------------------------------------------
Tue Mar 25 18:18:56 UTC 2014 - trenn@suse.de

View File

@ -19,7 +19,7 @@
%define dracutlibdir %{_libexecdir}/dracut
Name: dracut
Version: 036
Version: 037
Release: 0
Summary: Initramfs generator using udev
License: GPL-2.0+ and LGPL-2.1+
@ -41,7 +41,6 @@ Patch13: dracut_do_not_update_booloader_if_no_kernel_is_found.patch
Patch14: suse_grub_manpage.patch
Patch15: replace_dhclient_with_wickedd_dhcp_supplicants.patch
Patch16: fix-iscsi-firmware.patch
Patch17: remove-iscsiuio.patch
Patch18: 0015-add-new-s390x-specific-rule-files.patch
Patch19: change_write_ifcfg_to_suse.patch
Patch20: dracut-fix-whitespace-add-drivers_call.patch
@ -51,6 +50,11 @@ Patch23: s390-dcssblk.patch
Patch24: dracut-install-persistent-rule.patch
Patch25: dracut-really-always-add-autofs4.patch
Patch26: mdraid-setup.patch
Patch27: 0015-95udev-rules-Add-59-scsi-sg_utils.rules.patch
Patch28: 0016-90multipath-add-67-kpartx-compat.rules.patch
Patch29: 0017-90multipath-install-dracut-specific-service-file.patch
Patch30: 0018-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch
Patch31: 0019-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch
BuildRequires: asciidoc
BuildRequires: bash
BuildRequires: docbook-xsl-stylesheets
@ -96,7 +100,6 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package.
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
@ -106,6 +109,11 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package.
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%build
%configure\

View File

@ -1,7 +1,23 @@
Index: dracut-034/mkinitrd-suse.sh
===================================================================
--- dracut-034.orig/mkinitrd-suse.sh
+++ dracut-034/mkinitrd-suse.sh
From 6e2410d3e9403b030125e8d7f523de341466d658 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Mon, 7 Apr 2014 16:23:49 +0200
Subject: [PATCH] mkinitrd-suse: do not update bootloader if no kernel was
found
When no kernel is found mkinitrd-suse should exit without updating the
bootloader.
References: bnc#858268
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
mkinitrd-suse.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh
index d20270a..b31ea36 100755
--- a/mkinitrd-suse.sh
+++ b/mkinitrd-suse.sh
@@ -291,7 +291,9 @@ while (($# > 0)); do
done
@ -13,3 +29,6 @@ Index: dracut-034/mkinitrd-suse.sh
# We can have several targets/kernels, transform the list to an array
targets=( $targets )
--
1.8.1.4

View File

@ -1,7 +1,17 @@
Index: dracut-036/modules.d/95iscsi/parse-iscsiroot.sh
===================================================================
--- dracut-036.orig/modules.d/95iscsi/parse-iscsiroot.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/95iscsi/parse-iscsiroot.sh 2014-02-12 18:11:51.627855039 +0100
From af3c6eb8a04c2e526061f1dc82a94f01408bb415 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 7 Apr 2014 16:28:34 +0200
Subject: [PATCH] 95iscsi: Fix iSCSI firmware path
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95iscsi/parse-iscsiroot.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index 4be9d56..ec7764e 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -61,10 +61,9 @@ fi
# iscsi_firmware does not need argument checking
@ -23,3 +33,6 @@ Index: dracut-036/modules.d/95iscsi/parse-iscsiroot.sh
fi
fi
--
1.8.1.4

View File

@ -1,16 +1,23 @@
References: bnc#866660
From b96bf725952cc8b1489a4f52f8dd3e64d542dda7 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 9 Apr 2014 14:14:03 +0200
Subject: [PATCH] Fixup mdraid setup
this sed script to edit 64-md-raid-assemble.rules needs to
This sed script to edit 64-md-raid-assemble.rules needs to
be adjusted for latest mdadm
References: bnc#866660
Signed-off-by: NeilBrown <neilb@suse.de>
---
modules.d/90mdraid/module-setup.sh | 2 +-
modules.d/90mdraid/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- dracut-036.orig/modules.d/90mdraid/module-setup.sh
+++ dracut-036/modules.d/90mdraid/module-setup.sh
@@ -84,7 +84,7 @@ install() {
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index ac745d1..767b3aa 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -86,7 +86,7 @@ install() {
for rule in 64-md-raid.rules 64-md-raid-assembly.rules; do
rule_path="${initdir}${udevdir}/rules.d/${rule}"
[ -f "${rule_path}" ] && sed -i -r \
@ -19,3 +26,6 @@ Signed-off-by: NeilBrown <neilb@suse.de>
"${rule_path}"
done
--
1.8.1.4

View File

@ -1,41 +0,0 @@
Index: dracut-036/modules.d/95iscsi/cleanup-iscsi.sh
===================================================================
--- dracut-036.orig/modules.d/95iscsi/cleanup-iscsi.sh 2014-01-29 08:35:47.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-#!/bin/sh
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-[ -e /sys/module/bnx2i ] && killproc iscsiuio
-
Index: dracut-036/modules.d/95iscsi/iscsiroot.sh
===================================================================
--- dracut-036.orig/modules.d/95iscsi/iscsiroot.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/95iscsi/iscsiroot.sh 2014-02-12 18:15:20.665867839 +0100
@@ -38,11 +38,6 @@ iroot=${iroot#:}
# figured out a way how to check whether this is built-in or not
modprobe crc32c 2>/dev/null
-if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
- iscsiuio
- > /tmp/iscsiuio-started
-fi
-
handle_firmware()
{
if ! [ -e /tmp/iscsistarted-firmware ]; then
Index: dracut-036/modules.d/95iscsi/module-setup.sh
===================================================================
--- dracut-036.orig/modules.d/95iscsi/module-setup.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/95iscsi/module-setup.sh 2014-02-13 12:02:51.466789941 +0100
@@ -81,9 +81,7 @@ installkernel() {
# called by dracut
install() {
inst_multiple umount iscsistart hostname iscsi-iname
- inst_multiple -o iscsiuio
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
- inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
if ! dracut_module_included "systemd"; then
inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"

View File

@ -1,12 +1,46 @@
Index: dracut-036/modules.d/40network/dhclient-script.sh
===================================================================
--- dracut-036.orig/modules.d/40network/dhclient-script.sh 2014-01-29 08:35:47.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,104 +0,0 @@
From fc6cba152e299cee078d506ffec13a7db37dab20 Mon Sep 17 00:00:00 2001
From: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
Date: Mon, 7 Apr 2014 16:26:57 +0200
Subject: [PATCH] 40network: replace dhclient with wickedd-dhcp-supplicant
SLES12 is using wickedd, so we need to replace dhclient with
wickedd-dhcp-supplicant.
References: bnc#866771
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/40network/dhclient-script.sh | 152 ---------------------------------
modules.d/40network/dhclient.conf | 3 -
modules.d/40network/ifup.sh | 97 +++++++++++++++++++--
modules.d/40network/kill-dhclient.sh | 17 ----
modules.d/40network/module-setup.sh | 14 +--
5 files changed, 99 insertions(+), 184 deletions(-)
delete mode 100755 modules.d/40network/dhclient-script.sh
delete mode 100644 modules.d/40network/dhclient.conf
delete mode 100755 modules.d/40network/kill-dhclient.sh
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
deleted file mode 100755
index 50e8932..0000000
--- a/modules.d/40network/dhclient-script.sh
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/sh
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-PATH=/usr/sbin:/usr/bin:/sbin:/bin
-
-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
-
-# We already need a set netif here
-netif=$interface
-
-# Huh? Interface configured?
-[ -f "/tmp/net.$netif.up" ] && exit 0
-
-setup_interface() {
- ip=$new_ip_address
- mtu=$new_interface_mtu
@ -53,24 +87,42 @@ Index: dracut-036/modules.d/40network/dhclient-script.sh
- [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
-}
-
-PATH=/usr/sbin:/usr/bin:/sbin:/bin
-setup_interface6() {
- domain=$new_domain_name
- search=$(printf -- "$new_domain_search")
- namesrv=$new_domain_name_servers
- hostname=$new_host_name
- lease_time=$new_dhcp_lease_time
-
-export PS4="dhclient.$interface.$$ + "
-[ -e /run/initramfs/loginit.pipe ] && exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
- [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
-
-# We already need a set netif here
-netif=$interface
- ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
- dev ${netif} scope global valid_lft ${lease_time} \
- preferred_lft ${lease_time}
-
-# Huh? Interface configured?
-[ -f "/tmp/net.$netif.up" ] && exit 0
- [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
- if [ -n "$namesrv" ] ; then
- for s in $namesrv; do
- echo nameserver $s
- done
- fi >> /tmp/net.$netif.resolv.conf
-
- # Note: hostname can be fqdn OR short hostname, so chop off any
- # trailing domain name and explicity add any domain if set.
- [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
-}
-
-case $reason in
- PREINIT)
- echo "dhcp: PREINIT $netif up"
- linkup $netif
- ;;
-
- PREINIT6)
- echo "dhcp: PREINIT $netif up"
- linkup $netif
- ;;
-
- BOUND)
- echo "dhcp: BOND setting $netif"
- unset layer2
@ -95,35 +147,54 @@ Index: dracut-036/modules.d/40network/dhclient-script.sh
- echo "setup_net $netif"
- echo "source_hook initqueue/online $netif"
- [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
- echo "> /tmp/setup_net_$netif.ok"
- echo "> /tmp/setup_net_\$(cat /sys/class/net/$netif/address).ok"
- echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
- } > $hookdir/initqueue/setup_net_$netif.sh
-
- echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
- echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
- >/tmp/net.$netif.up
- ;;
-
- BOUND6)
- echo "dhcp: BOND6 setting $netif"
- setup_interface6
-
- set | while read line; do
- [ "${line#new_}" = "$line" ] && continue
- echo "$line"
- done >/tmp/dhclient.$netif.dhcpopts
-
- {
- echo '. /lib/net-lib.sh'
- echo "setup_net $netif"
- echo "source_hook initqueue/online $netif"
- [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
- echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
- } > $hookdir/initqueue/setup_net_$netif.sh
-
- echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
- >/tmp/net.$netif.up
- ;;
- *) echo "dhcp: $reason";;
-esac
-
-exit 0
Index: dracut-036/modules.d/40network/dhclient.conf
===================================================================
--- dracut-036.orig/modules.d/40network/dhclient.conf 2014-01-29 08:35:47.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf
deleted file mode 100644
index dbf5882..0000000
--- a/modules.d/40network/dhclient.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-request subnet-mask, broadcast-address, time-offset, routers,
- domain-name, domain-name-servers, domain-search, host-name,
- root-path, interface-mtu;
Index: dracut-036/modules.d/40network/ifup.sh
===================================================================
--- dracut-036.orig/modules.d/40network/ifup.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/40network/ifup.sh 2014-03-04 18:10:35.440663127 +0100
@@ -82,18 +82,101 @@ fi
[ -z "$netroot" ] && [ -z "$manualup" ] && exit 0
[ -n "$manualup" ] && >/tmp/net.$netif.manualup
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 51b0d52..25ce094 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -88,21 +88,106 @@ else
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0
fi
-# Run dhclient
+dhcp_apply() {
+ if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ]; then
+ . /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
@ -188,10 +259,13 @@ Index: dracut-036/modules.d/40network/ifup.sh
+ return 0
+}
+
# Run dhclient
do_dhcp() {
- # dhclient-script will mark the netif up and generate the online
- # event for nfsroot
- # XXX add -V vendor class and option parsing per kernel
# dhclient-script will mark the netif up and generate the online
# event for nfsroot
# XXX add -V vendor class and option parsing per kernel
- [ -e /tmp/dhclient.$netif.pid ] && return 0
+ [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ] && return 0
+
+ info "Preparation for DHCP transaction"
@ -205,7 +279,7 @@ Index: dracut-036/modules.d/40network/ifup.sh
+
+ # Address changed
+ ip $1 addr flush dev "$netif"
+
if ! iface_has_link $netif; then
- echo "No carrier detected"
- return 1
@ -217,11 +291,10 @@ Index: dracut-036/modules.d/40network/ifup.sh
+ return 1
+ fi
fi
- echo "Starting dhcp for interface $netif"
+
echo "Starting dhcp for interface $netif"
- dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \
- || echo "dhcp failed"
+
+ info "Starting DHCP on interface $netif"
+ $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
+ dhcp_apply $1 || return $?
+
@ -230,7 +303,7 @@ Index: dracut-036/modules.d/40network/ifup.sh
}
load_ipv6() {
@@ -217,8 +300,6 @@ if [ -e /tmp/team.info ]; then
@@ -226,8 +311,6 @@ if [ -e /tmp/team.info ]; then
fi
fi
@ -239,10 +312,11 @@ Index: dracut-036/modules.d/40network/ifup.sh
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
# start bridge if necessary
Index: dracut-036/modules.d/40network/kill-dhclient.sh
===================================================================
--- dracut-036.orig/modules.d/40network/kill-dhclient.sh 2014-01-29 08:35:47.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
diff --git a/modules.d/40network/kill-dhclient.sh b/modules.d/40network/kill-dhclient.sh
deleted file mode 100755
index 78060f5..0000000
--- a/modules.d/40network/kill-dhclient.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
@ -261,10 +335,10 @@ Index: dracut-036/modules.d/40network/kill-dhclient.sh
- read PID < $f;
- kill -9 $PID >/dev/null 2>&1
-done
Index: dracut-036/modules.d/40network/module-setup.sh
===================================================================
--- dracut-036.orig/modules.d/40network/module-setup.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/40network/module-setup.sh 2014-03-04 18:09:28.687659039 +0100
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 1df4174..b54f873 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -2,11 +2,14 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
@ -276,12 +350,12 @@ Index: dracut-036/modules.d/40network/module-setup.sh
check() {
local _program
- for _program in ip arping dhclient ; do
+ for _program in ip arping $WICKEDD_DHCP_PATH/wickedd-dhcp4 $WICKEDD_DHCP_PATH/wickedd-dhcp6 ; do
if ! type -P $_program >/dev/null; then
derror "Could not find program \"$_program\" required by network."
return 1
@@ -77,16 +80,18 @@ installkernel() {
- require_binaries ip arping dhclient || return 1
+ require_binaries ip arping $WICKEDD_DHCP_PATH/wickedd-dhcp4 $WICKEDD_DHCP_PATH/wickedd-dhcp6 || return 1
return 255
}
@@ -72,16 +75,18 @@ installkernel() {
# called by dracut
install() {
local _arch _i _dir
@ -303,7 +377,7 @@ Index: dracut-036/modules.d/40network/module-setup.sh
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
@@ -97,7 +102,6 @@ install() {
@@ -92,7 +97,6 @@ install() {
inst_hook cmdline 97 "$moddir/parse-bridge.sh"
inst_hook cmdline 98 "$moddir/parse-ip-opts.sh"
inst_hook cmdline 99 "$moddir/parse-ifname.sh"
@ -311,3 +385,6 @@ Index: dracut-036/modules.d/40network/module-setup.sh
_arch=$(uname -m)
--
1.8.1.4

View File

@ -1,8 +1,27 @@
Index: dracut-036/modules.d/95dcssblk/module-setup.sh
===================================================================
From c4a980a8fa7a2a9d5e25063b0d5b5070e59aa2cc Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Tue, 8 Apr 2014 08:53:59 +0200
Subject: [PATCH] 95dcssblk: Add new module for DCSS block devices
Add s390 dcssblk driver and introduce rd.dcssblk= to pass mounts
that should get activated at initrd stage.
References: FATE#308263
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95dcssblk/module-setup.sh | 28 ++++++++++++++++++++++++++++
modules.d/95dcssblk/parse-dcssblk.sh | 8 ++++++++
2 files changed, 36 insertions(+)
create mode 100755 modules.d/95dcssblk/module-setup.sh
create mode 100755 modules.d/95dcssblk/parse-dcssblk.sh
diff --git a/modules.d/95dcssblk/module-setup.sh b/modules.d/95dcssblk/module-setup.sh
new file mode 100755
index 0000000..11e3849
--- /dev/null
+++ dracut-036/modules.d/95dcssblk/module-setup.sh
@@ -0,0 +1,29 @@
+++ b/modules.d/95dcssblk/module-setup.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
@ -31,11 +50,11 @@ Index: dracut-036/modules.d/95dcssblk/module-setup.sh
+ # inst /etc/dcssblk.conf
+ #fi
+}
+
Index: dracut-036/modules.d/95dcssblk/parse-dcssblk.sh
===================================================================
diff --git a/modules.d/95dcssblk/parse-dcssblk.sh b/modules.d/95dcssblk/parse-dcssblk.sh
new file mode 100755
index 0000000..8f17440
--- /dev/null
+++ dracut-036/modules.d/95dcssblk/parse-dcssblk.sh
+++ b/modules.d/95dcssblk/parse-dcssblk.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
@ -45,3 +64,6 @@ Index: dracut-036/modules.d/95dcssblk/parse-dcssblk.sh
+ info "Loading dcssblk segments=$dcssblk_arg"
+ modprobe dcssblk segments=$dcssblk_arg
+fi
--
1.8.1.4

View File

@ -1,31 +1,30 @@
diff -rupN dracut-036.old/dracut.8 dracut-036/dracut.8
--- dracut-036.old/dracut.8 2014-01-29 07:36:45.000000000 +0000
+++ dracut-036/dracut.8 2014-02-13 05:39:56.965246846 +0000
@@ -189,7 +189,7 @@ If you need a special kernel module in t
.sp
An initramfs generated without the "hostonly" mode, does not contain any system configuration files (except for some special exceptions), so the configuration has to be done on the kernel command line\&. With this flexibility, you can easily boot from a changed root partition, without the need to recompile the initramfs image\&. So, you could completly change your root partition (move it inside a md raid with encryption and LVM on top), as long as you specify the correct filesystem LABEL or UUID on the kernel command line for your root device, dracut will find it and boot from it\&.
.sp
-The kernel command line usually can be configured in \fI/boot/grub/grub\&.conf\fR, if grub is your bootloader and it also can be edited in the real boot process in the grub menu\&.
+The kernel command line usually can be configured in \fI/boot/grub/menu\&.lst\fR, for GRUB Legacy, and \fI/boot/grub2/grub\&.cfg\fR, for GRUB2 if grub is your bootloader and it also can be edited in the real boot process in the grub menu\&.
.sp
The kernel command line can also be provided by the dhcp server with the root\-path option\&. See the section called \(lqNetwork Boot\(rq\&.
.sp
diff -rupN dracut-036.old/dracut.html dracut-036/dracut.html
--- dracut-036.old/dracut.html 2014-01-29 07:36:45.000000000 +0000
+++ dracut-036/dracut.html 2014-02-12 21:41:37.988588041 +0000
@@ -1277,7 +1277,7 @@ boot from a changed root partition, with
image. So, you could completly change your root partition (move it inside a md
raid with encryption and LVM on top), as long as you specify the correct
From 3607fd4c8a14ec0a1222e7f7903f6f12648367ef Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 8 Apr 2014 09:06:43 +0200
Subject: [PATCH] Update dracut manpage for GRUB Legacy and GRUB2
Signed-off-by: sfalken@opensuse.org
---
dracut.usage.asc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 6979af6..0787ead 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -99,9 +99,9 @@ raid with encryption and LVM on top), as long as you specify the correct
filesystem LABEL or UUID on the kernel command line for your root device, dracut
-will find it and boot from it.</p><p>The kernel command line usually can be configured in <span class="emphasis"><em>/boot/grub/grub.conf</em></span>, if
+will find it and boot from it.</p><p>The kernel command line usually can be configured in <span class="emphasis"><em>/boot/grub/menu.lst</em></span>, for GRUB Legacy, or <span class="emphasis"><em>/boot/grub2/grub.cfg</em></span>, for GRUB2 if
grub is your bootloader and it also can be edited in the real boot process in
the grub menu.</p><p>The kernel command line can also be provided by the dhcp server with the
root-path option. See <a class="xref" href="#NetworkBoot" title="Network Boot">the section called “Network Boot”</a>.</p><p>For a full reference of all kernel command line parameters,
@@ -3228,4 +3228,4 @@ local-fs-pre.target dracu
switch-root</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_author_4"></a>AUTHOR</h2></div></div></div><p>Harald Hoyer</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also_7"></a>SEE ALSO</h2></div></div></div><p><span class="strong"><strong>dracut</strong></span>(8) <span class="strong"><strong>bootup</strong></span>(7)</p></div></div><div class="appendix"><div class="titlepage"><div><div><h2 class="title"><a id="_license"></a>Appendix A. License</h2></div></div></div><p>This work is licensed under the Creative Commons Attribution/Share-Alike
License. To view a copy of this license, visit
<a class="ulink" href="http://creativecommons.org/licenses/by-sa/3.0/" target="_top">http://creativecommons.org/licenses/by-sa/3.0/</a> or send a letter to Creative
-Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</p></div></div></div></body></html>
\ No newline at end of file
+Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</p></div></div></div></body></html>
will find it and boot from it.
-The kernel command line usually can be configured in _/boot/grub/grub.conf_ or
-_/boot/grub2/grub.cfg_, if grub is your bootloader and it also can be edited in
-the real boot process in the grub menu.
+The kernel command line usually can be configured in _/boot/grub/grub.conf_,
+for GRUB legacy, or _/boot/grub2/grub.cfg_, for GRUB2 if grub is your
+bootloader and it also can be edited in the real boot process in the grub menu.
The kernel command line can also be provided by the dhcp server with the
root-path option. See <<NetworkBoot>>.
--
1.8.1.4

View File

@ -1,8 +1,27 @@
Index: dracut-036/modules.d/40network/net-genrules.sh
===================================================================
--- dracut-036.orig/modules.d/40network/net-genrules.sh 2014-01-29 08:35:47.000000000 +0100
+++ dracut-036/modules.d/40network/net-genrules.sh 2014-03-05 16:21:32.119553089 +0100
@@ -98,6 +98,9 @@ command -v fix_bootif >/dev/null || . /l
From 330bb44b7773c7b861a6aaa32d4524c783a162f0 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
Date: Tue, 8 Apr 2014 08:50:55 +0200
Subject: [PATCH] 40network: Fix race condition when wait for networks
If no network related params are specific, but rd.neednet=1 is set,
the default initqueue action is to wait until one of the network
interfaces is marked as setup properly.
This also help with initqueue's race condition when the network interface
shows upd late
References: bnc#866771
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/40network/net-genrules.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index af2f09c..6ec9239 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -98,6 +98,9 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
cond='ACTION=="add", SUBSYSTEM=="net"'
# if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
@ -12,3 +31,6 @@ Index: dracut-036/modules.d/40network/net-genrules.sh
fi
# if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh
--
1.8.1.4