dracut-026-48.git20130315

- use new initrd.target from systemd
- fixed rescue generation
This commit is contained in:
Harald Hoyer 2013-03-15 07:18:23 +01:00
parent a20c0e9d68
commit 61c4978036
16 changed files with 1060 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From c5a742a3bf2b9b9aab835639bed5c8c7477cb3a2 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Thu, 14 Mar 2013 09:50:07 +0100
Subject: [PATCH] Don't write DHCPV6C=yes for each dhcp (ipv4) configuration.
Caused probably by commit 32ec0a762d1dce36f20857ffd222863a3d550ed7
---
modules.d/45ifcfg/write-ifcfg.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index ae37358..79c1987 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -105,9 +105,7 @@ for netif in $IFACES ; do
echo "UUID=$uuid"
[ -n "$mtu" ] && echo "MTU=$mtu"
if [ -f /tmp/net.$netif.lease ]; then
- strstr "$ip" '*:*:*' &&
- echo "IPV6INIT=yes"
- echo "DHCPV6C=yes"
+ strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
echo "BOOTPROTO=dhcp"
cp /tmp/net.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease
else

View File

@ -0,0 +1,61 @@
From fd8e4aef9092a5daeeeb55e90105fef8d32ce56d Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Thu, 14 Mar 2013 09:51:07 +0100
Subject: [PATCH] Write BOOTPROTO=ibft for ip=ibft to ifcfg files
---
modules.d/40network/net-lib.sh | 1 +
modules.d/45ifcfg/write-ifcfg.sh | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index 4a4d7e7..f9b461b 100644
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -159,6 +159,7 @@ ibft_to_cmdline() {
hostname=$(read a < ${iface}/hostname; echo $a)
echo "ip=$ip::$gw:$mask:$hostname:$dev:none"
fi
+ echo $mac > /tmp/net.${dev}.has_ibft_config
done
) >> /etc/cmdline.d/40-ibft.conf
# reread cmdline
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 79c1987..773dc51 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -106,7 +106,11 @@ for netif in $IFACES ; do
[ -n "$mtu" ] && echo "MTU=$mtu"
if [ -f /tmp/net.$netif.lease ]; then
strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
- echo "BOOTPROTO=dhcp"
+ if [ -f /tmp/net.$netif.has_ibft_config ]; then
+ echo "BOOTPROTO=ibft"
+ else
+ echo "BOOTPROTO=dhcp"
+ fi
cp /tmp/net.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease
else
# If we've booted with static ip= lines, the override file is there
@@ -116,12 +120,16 @@ for netif in $IFACES ; do
echo "IPV6_AUTOCONF=no"
echo "IPV6ADDR=$ip/$mask"
else
- echo "BOOTPROTO=none"
- echo "IPADDR=$ip"
- if strstr "$mask" "."; then
- echo "NETMASK=$mask"
+ if [-f /tmp/net.$netif.has_ibft_config ]; then
+ echo "BOOTPROTO=ibft"
else
- echo "PREFIX=$mask"
+ echo "BOOTPROTO=none"
+ echo "IPADDR=$ip"
+ if strstr "$mask" "."; then
+ echo "NETMASK=$mask"
+ else
+ echo "PREFIX=$mask"
+ fi
fi
fi
if strstr "$gw" '*:*:*'; then

View File

@ -0,0 +1,24 @@
From c390590fac363a3ca467d4be0339baa01936e85d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:51:47 +0100
Subject: [PATCH] TODO: remove completed items
---
TODO | 2 --
1 file changed, 2 deletions(-)
diff --git a/TODO b/TODO
index 2b7da3f..9eeedfa 100644
--- a/TODO
+++ b/TODO
@@ -24,10 +24,8 @@ GENERATOR TODO
- add presets (predefined set of modules)
- add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions)
-- provide "installkernel" and "new-kernel-pkg"
- add mechanism for module specific command line options
- pkg-config integration, to make it easy for other packages to use us.
-- add recovery image creator (mkrecovery)
- default module specification could use some work
- udev rule copying, as mentioned above, is a bit too hard-coded

View File

@ -0,0 +1,22 @@
From ce92ca0527fd004c23a997231a0a5e3c0ba0b89f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:52:15 +0100
Subject: [PATCH] 51-dracut-rescue-postinst.sh: fixed new-kernel-pkg call
---
51-dracut-rescue-postinst.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh
index 5c0fe2c..21208a4 100755
--- a/51-dracut-rescue-postinst.sh
+++ b/51-dracut-rescue-postinst.sh
@@ -51,7 +51,7 @@ cp "$KERNEL_IMAGE" "${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue"
KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue"
-new-kernel-image --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue"
+new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue"
((ret+=$?))

View File

@ -0,0 +1,26 @@
From 87dc81a1f69f20b9015b47d0935fa3b99dc54e5c Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:52:44 +0100
Subject: [PATCH] dracut-install: handle more ldd errors
---
install/dracut-install.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index 8aa0e2e..5040dea 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -294,6 +294,12 @@ static int resolve_deps(const char *src)
if (strstr(buf, "not regular file"))
break;
+ if (strstr(buf, "cannot read header"))
+ break;
+
+ if (strstr(buf, destrootdir))
+ break;
+
p = strstr(buf, "/");
if (p) {
int r;

View File

@ -0,0 +1,31 @@
From d46394ad330abe6e1368e5d40e01e8b97a7ae40c Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:53:00 +0100
Subject: [PATCH] dracut.spec: fix requirements
---
dracut.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index b21f220..4870390 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -70,7 +70,7 @@ Provides: mkinitrd = 2.6.1
Obsoletes: dracut-kernel < 005
Provides: dracut-kernel = %{version}-%{release}
-Requires: bash > 4
+Requires: bash >= 4
Requires: coreutils
Requires: cpio
Requires: filesystem >= 2.1.0
@@ -86,7 +86,7 @@ Requires: kbd kbd-misc
%if 0%{?fedora} || 0%{?rhel} > 6
Requires: util-linux >= 2.21
-Requires: systemd > 198-4
+Requires: systemd >= 198-4
Conflicts: grubby < 8.23
%else
Requires: udev > 166

View File

@ -0,0 +1,22 @@
From e0e99c59a585e55361eb589aeab1d8f443165eef Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:54:15 +0100
Subject: [PATCH] ifcfg/write-ifcfg.sh: fixed typo
---
modules.d/45ifcfg/write-ifcfg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 773dc51..f7a476c 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -120,7 +120,7 @@ for netif in $IFACES ; do
echo "IPV6_AUTOCONF=no"
echo "IPV6ADDR=$ip/$mask"
else
- if [-f /tmp/net.$netif.has_ibft_config ]; then
+ if [ -f /tmp/net.$netif.has_ibft_config ]; then
echo "BOOTPROTO=ibft"
else
echo "BOOTPROTO=none"

View File

@ -0,0 +1,38 @@
From 0a5fd0dcec3f6fd49626fed0cac4e89cd1ad3453 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:54:36 +0100
Subject: [PATCH] iscsi/iscsiroot.sh: do not mount manually in systemd mode
---
modules.d/95iscsi/iscsiroot.sh | 3 ++-
modules.d/95iscsi/module-setup.sh | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
index aa6c6ec..0c04219 100755
--- a/modules.d/95iscsi/iscsiroot.sh
+++ b/modules.d/95iscsi/iscsiroot.sh
@@ -145,7 +145,8 @@ handle_netroot()
wait_for_dev /dev/root
# install mount script
- echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
+ [ -z "$DRACUT_SYSTEMD" ] && \
+ echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
fi
# force udevsettle to break
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index f06c783..1910a33 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -78,6 +78,8 @@ install() {
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
- inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
+ if ! dracut_module_included "systemd"; then
+ inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
+ fi
dracut_need_initqueue
}

View File

@ -0,0 +1,22 @@
From 18d0c9b8589b9ffda3543a18676037105d8a48f9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:56:53 +0100
Subject: [PATCH] nfs/nfsroot.sh: only cat /etc/fstab, if existant
---
modules.d/95nfs/nfsroot.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95nfs/nfsroot.sh b/modules.d/95nfs/nfsroot.sh
index 803a71f..067d172 100755
--- a/modules.d/95nfs/nfsroot.sh
+++ b/modules.d/95nfs/nfsroot.sh
@@ -18,7 +18,7 @@ nfs_to_var $root $netif
mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; }
-cat $NEWROOT/etc/fstab > /dev/null
+[ -f $NEWROOT/etc/fstab ] && cat $NEWROOT/etc/fstab > /dev/null
# inject new exit_if_exists
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/nfs.sh

View File

@ -0,0 +1,23 @@
From c853dc72e90b998ca2e1e3133f7e97697999be87 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:59:07 +0100
Subject: [PATCH] udev-rules/module-setup.sh: do not install /run/*
---
modules.d/95udev-rules/module-setup.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index 1eb8642..9459646 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -36,9 +36,6 @@ install() {
prepare_udev_rules 59-persistent-storage.rules 61-persistent-storage.rules
- inst_dir /run/udev
- inst_dir /run/udev/rules.d
-
{
for i in cdrom tape dialout floppy; do
if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then

View File

@ -0,0 +1,234 @@
From 85c85f07e27234d305a2995ef059aa1241d4875d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 15:35:54 +0100
Subject: [PATCH] systemd: switch to new initrd.target
(normal startup)
:
:
v
basic.target
|
______________________/|
/ |
| sysroot.mount
| |
| v
| initrd-root-fs.target
| |
| v
| initrd-parse-etc.service
(custom initrd services) |
| v
| (sysroot-usr.mount and
| various mounts marked
| with fstab option
| x-initrd.mount)
| |
| v
| initrd-fs.target
| |
\______________________ |
\|
v
initrd.target
|
v
initrd-cleanup.service
isolates to
initrd-switch-root.target
|
v
______________________/|
/ |
| initrd-udevadm-cleanup-db.service
| |
(custom initrd services) |
| |
\______________________ |
\|
v
initrd-switch-root.target
|
v
initrd-switch-root.service
|
v
switch-root
---
modules.d/98systemd/dracut-mount.service | 4 ++--
modules.d/98systemd/dracut-pre-mount.service | 2 +-
modules.d/98systemd/dracut-pre-pivot.service | 4 ++--
modules.d/98systemd/emergency.service | 2 +-
modules.d/98systemd/module-setup.sh | 20 +++++---------------
modules.d/98systemd/udevadm-cleanup-db.service | 22 ----------------------
modules.d/99fs-lib/fs-lib.sh | 4 ++--
7 files changed, 13 insertions(+), 45 deletions(-)
delete mode 100644 modules.d/98systemd/udevadm-cleanup-db.service
diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service
index b26b8a5..5c12683 100644
--- a/modules.d/98systemd/dracut-mount.service
+++ b/modules.d/98systemd/dracut-mount.service
@@ -11,8 +11,8 @@
Description=dracut mount hook
Documentation=man:dracut-mount.service(8)
DefaultDependencies=no
-After=dracut-pre-mount.service dracut-initqueue.service initrd-parse-etc.service root-fs.target initrd-fs.target
-Wants=root-fs.target initrd-fs.target
+After=initrd-root-fs.target initrd-parse-etc.service
+
ConditionPathExists=/etc/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
ConditionKernelCommandLine=|rd.break=mount
diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service
index 17bfda9..0d76943 100644
--- a/modules.d/98systemd/dracut-pre-mount.service
+++ b/modules.d/98systemd/dracut-pre-mount.service
@@ -11,7 +11,7 @@
Description=dracut pre-mount hook
Documentation=man:dracut-pre-mount.service(8)
DefaultDependencies=no
-Before=sysroot.mount root-fs.target
+Before=initrd-root-fs.target
After=dracut-initqueue.service
After=cryptsetup.target
ConditionPathExists=/etc/initrd-release
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
index 49f76ef..72941c9 100644
--- a/modules.d/98systemd/dracut-pre-pivot.service
+++ b/modules.d/98systemd/dracut-pre-pivot.service
@@ -11,8 +11,7 @@
Description=dracut pre-pivot and cleanup hook
Documentation=man:dracut-pre-pivot.service(8)
DefaultDependencies=no
-After=dracut-mount.service dracut-initqueue.service initrd-parse-etc.service initrd-fs.target root-fs.target
-Wants=initrd-fs.target root-fs.target
+After=initrd-fs.target
Before=initrd-cleanup.service
ConditionPathExists=/etc/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
@@ -25,6 +24,7 @@ StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
KillMode=process
+RemainAfterExit=yes
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service
index 18bb45f..a932739 100644
--- a/modules.d/98systemd/emergency.service
+++ b/modules.d/98systemd/emergency.service
@@ -17,7 +17,7 @@ Wants=systemd-vconsole-setup.service
Environment=HOME=/
WorkingDirectory=/
ExecStart=/bin/dracut-emergency
-ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd.target
+ExecStopPost=-/usr/bin/systemctl --fail --no-block default
Type=oneshot
StandardInput=tty-force
StandardOutput=inherit
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index 0119291..f74ae88 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -46,8 +46,9 @@ install() {
$systemdsystemunitdir/basic.target \
$systemdsystemunitdir/halt.target \
$systemdsystemunitdir/kexec.target \
+ $systemdsystemunitdir/initrd.target \
$systemdsystemunitdir/initrd-fs.target \
- $systemdsystemunitdir/root-fs.target \
+ $systemdsystemunitdir/initrd-root-fs.target \
$systemdsystemunitdir/local-fs.target \
$systemdsystemunitdir/local-fs-pre.target \
$systemdsystemunitdir/remote-fs.target \
@@ -148,8 +149,8 @@ install() {
# install adm user/group for journald
dracut_install nologin
- egrep '^adm:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd"
- egrep '^adm:' /etc/group >> "$initdir/etc/group"
+ egrep '^systemd-journal:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd"
+ egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group"
ln -fs $systemdutildir/systemd "$initdir/init"
ln -fs $systemdutildir/systemd "$initdir/sbin/init"
@@ -163,15 +164,7 @@ install() {
mkdir -p "${initdir}${dracutsystemunitdir}/initrd.target.wants"
- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.d"
- {
- echo "[Unit]"
- echo "After="
- echo "After=emergency.service emergency.target"
- } > "${initdir}${systemdsystemunitdir}/sysinit.target.d/nolocalfs.conf"
-
- inst_simple "$moddir/initrd.target" ${dracutsystemunitdir}/initrd.target
- ln -fs ${dracutsystemunitdir}/initrd.target "${initdir}${systemdsystemunitdir}/default.target"
+ ln -fs initrd.target "${initdir}${systemdsystemunitdir}/default.target"
inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
inst_simple "$moddir/dracut-cmdline.service" ${dracutsystemunitdir}/dracut-cmdline.service
@@ -201,8 +194,6 @@ install() {
inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service
ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-pivot.service"
- ln -fs ../initrd-parse-etc.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/initrd-parse-etc.service"
-
inst_rules 99-systemd.rules
for i in \
@@ -224,6 +215,5 @@ install() {
echo "RateLimitBurst=0"
} >> "$initdir/etc/systemd/journald.conf"
-
}
diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service
deleted file mode 100644
index fba032a..0000000
--- a/modules.d/98systemd/udevadm-cleanup-db.service
+++ /dev/null
@@ -1,22 +0,0 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Cleanup udevd DB
-Documentation=man:udevadm-cleanup-db.service(8)
-DefaultDependencies=no
-ConditionPathExists=/etc/initrd-release
-Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
-After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
-Before=initrd-switch-root.target
-
-[Service]
-Type=oneshot
-ExecStart=-/usr/bin/udevadm info --cleanup-db
-StandardInput=null
-StandardOutput=null
-StandardError=null
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
index 838ffa6..6936bbb 100755
--- a/modules.d/99fs-lib/fs-lib.sh
+++ b/modules.d/99fs-lib/fs-lib.sh
@@ -220,9 +220,9 @@ write_fs_tab() {
[ -z "$_rootfstype" ] && _rootfstype="auto"
if [ -z "$_rootflags" ]; then
- _rootflags="ro"
+ _rootflags="ro,x-initrd-rootfs.mount"
else
- _rootflags="ro,$_rootflags"
+ _rootflags="ro,$_rootflags,x-initrd-rootfs.mount"
fi
_rw=0

View File

@ -0,0 +1,30 @@
From 6b46e7baa0e16a864259cb9e60aa99e496be6d78 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 19:03:20 +0100
Subject: [PATCH] systemd: do not use "systemd --version" until fixed
---
modules.d/98systemd/module-setup.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index f74ae88..17dbc44 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -18,11 +18,11 @@ depends() {
install() {
local _mods
- SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; })
- if (( $SYSTEMD_VERSION < 198 )); then
- dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198."
- exit 1
- fi
+# SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; })
+# if (( $SYSTEMD_VERSION < 198 )); then
+# dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198."
+# exit 1
+# fi
if strstr "$prefix" "/run/"; then
dfatal "systemd does not work a prefix, which contains \"/run\"!!"

View File

@ -0,0 +1,23 @@
From 81b676a675d89f8f688c5508a3eb8225196796e5 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Thu, 14 Mar 2013 13:48:06 -0400
Subject: [PATCH] fix typo in dracut.conf.5.asc
It's /etc/dracut.conf.d, not /etc/dracut/conf.d
---
dracut.conf.5.asc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
index 1cc810f..dbaa2e5 100644
--- a/dracut.conf.5.asc
+++ b/dracut.conf.5.asc
@@ -140,7 +140,7 @@ Files
-----
_/etc/dracut.conf_::
Old configuration file. You better use your own file in
- _/etc/dracut/conf.d/_.
+ _/etc/dracut.conf.d/_.
_/etc/dracut.conf.d/_::
Any _/etc/dracut.conf.d/*.conf_ file can overwrite the values in

436
0046-fixed-testsuite.patch Normal file
View File

@ -0,0 +1,436 @@
From bb278147cfc969159fa5f44768fcd1fd5fb494fc Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 18:29:19 +0100
Subject: [PATCH] fixed testsuite
---
test/TEST-01-BASIC/test.sh | 4 ++--
test/TEST-02-SYSTEMD/test.sh | 6 +++---
test/TEST-03-USR-MOUNT/test.sh | 4 ++--
test/TEST-04-FULL-SYSTEMD/test.sh | 6 +++---
test/TEST-10-RAID/test.sh | 4 ++--
test/TEST-11-LVM/test.sh | 6 +++---
test/TEST-12-RAID-DEG/test.sh | 6 +++---
test/TEST-13-ENC-RAID-LVM/test.sh | 10 +++++-----
test/TEST-15-BTRFSRAID/test.sh | 9 ++++-----
test/TEST-16-DMSQUASH/test.sh | 2 +-
test/TEST-20-NFS/test.sh | 4 ++--
test/TEST-30-ISCSI/test.sh | 8 ++++----
test/TEST-40-NBD/create-root.sh | 2 +-
test/TEST-40-NBD/test.sh | 17 +++++++++--------
test/TEST-50-MULTINIC/test.sh | 4 ++--
15 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index 7ce4f9d..7727cd0 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -11,7 +11,7 @@ test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext3 \
-hdb $TESTDIR/result \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-watchdog i6300esb -watchdog-action poweroff \
-append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \
@@ -70,7 +70,7 @@ test_setup() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext3 \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
-append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
index 6defa08..459cf03 100755
--- a/test/TEST-02-SYSTEMD/test.sh
+++ b/test/TEST-02-SYSTEMD/test.sh
@@ -8,7 +8,7 @@ KVERSION=${KVERSION-$(uname -r)}
test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext3 \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -66,9 +66,9 @@ test_setup() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext3 \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
index 0dcd13c..680720b 100755
--- a/test/TEST-03-USR-MOUNT/test.sh
+++ b/test/TEST-03-USR-MOUNT/test.sh
@@ -18,7 +18,7 @@ client_run() {
-hda $TESTDIR/root.btrfs \
-hdb $TESTDIR/usr.btrfs \
-hdc $TESTDIR/result \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-watchdog i6300esb -watchdog-action poweroff \
-append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
@@ -105,7 +105,7 @@ test_setup() {
$testdir/run-qemu \
-hda $TESTDIR/root.btrfs \
-hdb $TESTDIR/usr.btrfs \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
-append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
index 0b8e999..d3dc7ef 100755
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
@@ -20,7 +20,7 @@ client_run() {
-hda $TESTDIR/root.btrfs \
-hdb $TESTDIR/usr.btrfs \
-hdc $TESTDIR/result \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -247,9 +247,9 @@ EOF
$testdir/run-qemu \
-hda $TESTDIR/root.btrfs \
-hdb $TESTDIR/usr.btrfs \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
index b71cf9d..e11c518 100755
--- a/test/TEST-10-RAID/test.sh
+++ b/test/TEST-10-RAID/test.sh
@@ -10,7 +10,7 @@ test_run() {
DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
$testdir/run-qemu \
-hda $DISKIMAGE \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -67,7 +67,7 @@ test_setup() {
# Invoke KVM and/or QEMU to actually create the target filesystem.
$testdir/run-qemu \
-hda $DISKIMAGE \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
-append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
index c40b4df..d876e55 100755
--- a/test/TEST-11-LVM/test.sh
+++ b/test/TEST-11-LVM/test.sh
@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext2 \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -61,9 +61,9 @@ test_setup() {
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
rm -rf $TESTDIR/overlay
# Invoke KVM and/or QEMU to actually create the target filesystem.
- $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -nographic -net none \
+ $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
(
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
index 7e4b804..1eae41a 100755
--- a/test/TEST-12-RAID-DEG/test.sh
+++ b/test/TEST-12-RAID-DEG/test.sh
@@ -15,7 +15,7 @@ client_run() {
cp --sparse=always --reflink=auto $TESTDIR/disk3.img $TESTDIR/disk3.img.new
$testdir/run-qemu \
- -hda $TESTDIR/root.ext2 -m 256M -nographic \
+ -hda $TESTDIR/root.ext2 -m 256M -nographic -smp 2 \
-hdc $TESTDIR/disk2.img.new \
-hdd $TESTDIR/disk3.img.new \
-net none -kernel /boot/vmlinuz-$KVERSION \
@@ -106,9 +106,9 @@ test_setup() {
-hdb $TESTDIR/disk1.img \
-hdc $TESTDIR/disk2.img \
-hdd $TESTDIR/disk3.img \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
index e5d3939..b8fc7ff 100755
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
@@ -17,7 +17,7 @@ test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext2 \
-hdb $TESTDIR/check-success.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -30,7 +30,7 @@ test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext2 \
-hdb $TESTDIR/check-success.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
@@ -43,7 +43,7 @@ test_run() {
$testdir/run-qemu \
-hda $TESTDIR/root.ext2 \
-hdb $TESTDIR/check-success.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
-initrd $TESTDIR/initramfs.testing
@@ -98,9 +98,9 @@ test_setup() {
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
rm -rf $TESTDIR/overlay
# Invoke KVM and/or QEMU to actually create the target filesystem.
- $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -nographic -net none \
+ $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
cryptoUUIDS=$(grep --binary-files=text -m 3 ID_FS_UUID $TESTDIR/root.ext2)
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
index 981f919..8f013d5 100755
--- a/test/TEST-15-BTRFSRAID/test.sh
+++ b/test/TEST-15-BTRFSRAID/test.sh
@@ -9,9 +9,9 @@ test_run() {
DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img
$testdir/run-qemu \
-hda $DISKIMAGE \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
- -append "root=LABEL=root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
+ -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
grep -m 1 -q dracut-root-block-success $DISKIMAGE || return 1
}
@@ -67,9 +67,9 @@ test_setup() {
# Invoke KVM and/or QEMU to actually create the target filesystem.
$testdir/run-qemu \
-hda $DISKIMAGE \
- -m 256M -nographic -net none \
+ -m 256M -smp 2 -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=LABEL=root rw quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1
@@ -79,7 +79,6 @@ test_setup() {
. $basedir/dracut-functions.sh
dracut_install poweroff shutdown
inst_hook emergency 000 ./hard-off.sh
- inst ./cryptroot-ask.sh /sbin/cryptroot-ask
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
)
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
index 9c4f356..1f0854e 100755
--- a/test/TEST-16-DMSQUASH/test.sh
+++ b/test/TEST-16-DMSQUASH/test.sh
@@ -19,7 +19,7 @@ test_run() {
-boot order=d \
-cdrom $TESTDIR/livecd.iso \
-hda $TESTDIR/root.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 5e32d7c..daf5bac 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -17,7 +17,7 @@ run_server() {
fsck -a $TESTDIR/server.ext3 || return 1
$testdir/run-qemu \
-hda $TESTDIR/server.ext3 \
- -m 256M \
+ -m 256M -smp 2 \
-nographic \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net socket,listen=127.0.0.1:12320 \
@@ -54,7 +54,7 @@ client_test() {
$testdir/run-qemu \
-hda $TESTDIR/client.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net nic,macaddr=$mac,model=e1000 \
-net socket,connect=127.0.0.1:12320 \
-kernel /boot/vmlinuz-$KVERSION \
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
index c1febc9..f6893a8 100755
--- a/test/TEST-30-ISCSI/test.sh
+++ b/test/TEST-30-ISCSI/test.sh
@@ -16,7 +16,7 @@ run_server() {
-hdb $TESTDIR/root.ext3 \
-hdc $TESTDIR/iscsidisk2.img \
-hdd $TESTDIR/iscsidisk3.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-serial $SERIAL \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net socket,listen=127.0.0.1:12330 \
@@ -41,7 +41,7 @@ run_client() {
$testdir/run-qemu \
-hda $TESTDIR/client.img \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
-net socket,connect=127.0.0.1:12330 \
-kernel /boot/vmlinuz-$KVERSION \
@@ -147,9 +147,9 @@ test_setup() {
-hdb $TESTDIR/client.img \
-hdc $TESTDIR/iscsidisk2.img \
-hdd $TESTDIR/iscsidisk3.img \
- -m 256M -nographic -net none \
+ -smp 2 -m 256M -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1
rm $TESTDIR/client.img
diff --git a/test/TEST-40-NBD/create-root.sh b/test/TEST-40-NBD/create-root.sh
index 9c1c09e..62188d7 100755
--- a/test/TEST-40-NBD/create-root.sh
+++ b/test/TEST-40-NBD/create-root.sh
@@ -13,7 +13,7 @@ lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test && \
lvm vgcreate dracut /dev/mapper/dracut_crypt_test && \
lvm lvcreate -l 100%FREE -n root dracut && \
lvm vgchange -ay && \
-mke2fs -j /dev/dracut/root && \
+mke2fs -L dracut -j /dev/dracut/root && \
/sbin/tune2fs -e continue /dev/dracut/root && \
mkdir -p /sysroot && \
mount /dev/dracut/root /sysroot && \
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
index dcff8f7..dae65f2 100755
--- a/test/TEST-40-NBD/test.sh
+++ b/test/TEST-40-NBD/test.sh
@@ -18,7 +18,7 @@ run_server() {
-hda $TESTDIR/server.ext2 \
-hdb $TESTDIR/nbd.ext2 \
-hdc $TESTDIR/encrypted.ext2 \
- -m 256M -nographic \
+ -m 256M -smp 2 -nographic \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net socket,listen=127.0.0.1:12340 \
-serial $SERIAL \
@@ -55,7 +55,7 @@ client_test() {
$testdir/run-qemu \
-hda $TESTDIR/flag.img \
- -m 512M \
+ -m 512M -smp 2 \
-nographic \
-net nic,macaddr=$mac,model=e1000 \
-net socket,connect=127.0.0.1:12340 \
@@ -166,16 +166,16 @@ client_run() {
. $TESTDIR/luks.uuid
- client_test "NBD root=/dev/dracut/root netroot=nbd:IP:port" \
+ client_test "NBD root=LABEL=dracut netroot=nbd:IP:port" \
52:54:00:12:34:00 \
- "root=/dev/dracut/root rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:2001" || return 1
+ "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:2001" || return 1
# XXX This should be ext2,errors=panic but that doesn't currently
# XXX work when you have a real root= line in addition to netroot=
# XXX How we should work here needs clarification
- client_test "NBD root=/dev/dracut/root netroot=dhcp (w/ fstype and opts)" \
+ client_test "NBD root=LABEL=dracut netroot=dhcp (w/ fstype and opts)" \
52:54:00:12:34:05 \
- "root=/dev/dracut/root rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1
+ "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1
if [[ -s server.pid ]]; then
sudo kill -TERM $(cat $TESTDIR/server.pid)
@@ -213,6 +213,7 @@ make_encrypted_root() {
export initdir=$TESTDIR/overlay
. $basedir/dracut-functions.sh
dracut_install mke2fs poweroff cp umount tune2fs
+ inst_hook emergency 000 ./hard-off.sh
inst_hook initqueue 01 ./create-root.sh
inst_hook initqueue/finished 01 ./finished-false.sh
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -231,10 +232,10 @@ make_encrypted_root() {
$testdir/run-qemu \
-hda $TESTDIR/flag.img \
-hdb $TESTDIR/encrypted.ext2 \
- -m 256M \
+ -m 256M -smp 2\
-nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -m 1 -q dracut-root-block-created $TESTDIR/flag.img || return 1
grep -a -m 1 ID_FS_UUID $TESTDIR/flag.img > $TESTDIR/luks.uuid
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
index 65d76b5..17c8cc5 100755
--- a/test/TEST-50-MULTINIC/test.sh
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -17,7 +17,7 @@ run_server() {
fsck -a $TESTDIR/server.ext3 || return 1
$testdir/run-qemu \
-hda $TESTDIR/server.ext3 \
- -m 512M \
+ -m 512M -smp 2 \
-nographic \
-netdev socket,mcast=230.0.0.1:12320,id=net0 \
-net nic,macaddr=52:54:01:12:34:56,model=e1000,netdev=net0 \
@@ -52,7 +52,7 @@ client_test() {
return 1
fi
- $testdir/run-qemu -hda $TESTDIR/client.img -m 512M -nographic \
+ $testdir/run-qemu -hda $TESTDIR/client.img -m 512M -smp 2 -nographic \
-netdev socket,mcast=230.0.0.1:12320,id=net0 \
-net nic,netdev=net0,macaddr=52:54:00:12:34:$mac1,model=e1000 \
-netdev socket,mcast=230.0.0.1:12320,id=net1 \

View File

@ -0,0 +1,22 @@
From 7e9fc37db84636de2f704d165ff0ffdc6e964530 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Mar 2013 07:11:17 +0100
Subject: [PATCH] dracut.spec: bump systemd version requirement
---
dracut.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.spec b/dracut.spec
index 4870390..ac4a786 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -86,7 +86,7 @@ Requires: kbd kbd-misc
%if 0%{?fedora} || 0%{?rhel} > 6
Requires: util-linux >= 2.21
-Requires: systemd >= 198-4
+Requires: systemd >= 198-5
Conflicts: grubby < 8.23
%else
Requires: udev > 166

View File

@ -10,7 +10,7 @@
Name: dracut
Version: 026
Release: 33.git20130313%{?dist}
Release: 48.git20130315%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -61,6 +61,21 @@ Patch29: 0029-systemd-remove-upstream-renamed-old-service-files.patch
Patch30: 0030-kernel-modules-move-usb-storage-out-of-fixed-drivers.patch
Patch31: 0031-dracut.sh-Add-noimageifnotneeded-parameter.patch
Patch32: 0032-shutdown-shutdown.sh-mount-move-all-basic-mounts-out.patch
Patch33: 0033-Don-t-write-DHCPV6C-yes-for-each-dhcp-ipv4-configura.patch
Patch34: 0034-Write-BOOTPROTO-ibft-for-ip-ibft-to-ifcfg-files.patch
Patch35: 0035-TODO-remove-completed-items.patch
Patch36: 0036-51-dracut-rescue-postinst.sh-fixed-new-kernel-pkg-ca.patch
Patch37: 0037-dracut-install-handle-more-ldd-errors.patch
Patch38: 0038-dracut.spec-fix-requirements.patch
Patch39: 0039-ifcfg-write-ifcfg.sh-fixed-typo.patch
Patch40: 0040-iscsi-iscsiroot.sh-do-not-mount-manually-in-systemd-.patch
Patch41: 0041-nfs-nfsroot.sh-only-cat-etc-fstab-if-existant.patch
Patch42: 0042-udev-rules-module-setup.sh-do-not-install-run.patch
Patch43: 0043-systemd-switch-to-new-initrd.target.patch
Patch44: 0044-systemd-do-not-use-systemd-version-until-fixed.patch
Patch45: 0045-fix-typo-in-dracut.conf.5.asc.patch
Patch46: 0046-fixed-testsuite.patch
Patch47: 0047-dracut.spec-bump-systemd-version-requirement.patch
BuildRequires: dash bash git
@ -119,7 +134,7 @@ Requires: kbd kbd-misc
%if 0%{?fedora} || 0%{?rhel} > 6
Requires: util-linux >= 2.21
Requires: systemd >= 198-4
Requires: systemd >= 198-5
Conflicts: grubby < 8.23
%else
Requires: udev > 166
@ -450,6 +465,10 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d/02-norescue.conf
%changelog
* Fri Mar 15 2013 Harald Hoyer <harald@redhat.com> 026-48.git20130315
- use new initrd.target from systemd
- fixed rescue generation
* Wed Mar 13 2013 Harald Hoyer <harald@redhat.com> 026-33.git20130313
- add module-load.d modules to the initramfs
- add sysctl.d to the initramfs