dracut-018-22.git20120418

- new upstream version
This commit is contained in:
Harald Hoyer 2012-04-18 13:18:08 +02:00
parent ab65ae207e
commit 953eb612d1
13 changed files with 597 additions and 7 deletions

View File

@ -0,0 +1,32 @@
From 324be70f8070105c106c5901dd0575cb116cebc9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 16 Apr 2012 14:50:35 +0200
Subject: [PATCH] udev-rules: remove 01-ignore.rules
---
modules.d/95udev-rules/01-ignore.rules | 1 -
modules.d/95udev-rules/module-setup.sh | 3 ---
2 files changed, 4 deletions(-)
delete mode 100644 modules.d/95udev-rules/01-ignore.rules
diff --git a/modules.d/95udev-rules/01-ignore.rules b/modules.d/95udev-rules/01-ignore.rules
deleted file mode 100644
index b32f22e..0000000
--- a/modules.d/95udev-rules/01-ignore.rules
+++ /dev/null
@@ -1 +0,0 @@
-KERNEL=="ram[0-9]*", OPTIONS+="ignore_device", OPTIONS+="last_rule"
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index 1c71336..b17232f 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -20,9 +20,6 @@ install() {
#Some debian udev rules are named differently
inst_rules 50-udev.rules 95-late.rules
- # ignore some devices in the initrd
- inst_rules "$moddir/01-ignore.rules"
-
# for firmware loading
inst_rules 50-firmware.rules
dracut_install cat uname

View File

@ -0,0 +1,22 @@
From 25ff71b0c756bf2036bec78557398946d45bcbd3 Mon Sep 17 00:00:00 2001
From: Nikoli <nikoli@lavabit.com>
Date: Tue, 17 Apr 2012 11:31:27 +0200
Subject: [PATCH] lsinitrd: support symlinks
---
lsinitrd.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 1eaa37d..e6767dc 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -34,7 +34,7 @@ image="${1:-/boot/initramfs-$(uname -r).img}"
[[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
CAT=zcat
-FILE_T=$(file "$image")
+FILE_T=$(file --dereference "$image")
if echo "test"|xz|xz -dc --single-stream >/dev/null 2>&1; then
XZ_SINGLE_STREAM="--single-stream"

View File

@ -0,0 +1,31 @@
From 97903dfc476ae0c5ccaa4ddef294e2da43411355 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 17 Apr 2012 12:06:51 +0200
Subject: [PATCH] dracut.cmdline.7.asc: document "resume=" option
---
dracut.cmdline.7.asc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index a1e06dd..c77fee5 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -64,6 +64,17 @@ rootfstype=ext3
do not honor special mount options for the root filesystem found in
_/etc/fstab_ of the real root.
+**resume=**_<path to resume partition>_
++
+E.g.:
++
+----
+resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
+resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
+resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
+----
+
+
Misc
~~~~
**rd.driver.blacklist=**_<drivername>[,<drivername>,...]_::

View File

@ -0,0 +1,169 @@
From a7c9cbe1a21ecc306fce3127be0a4ad75c5fcfcb Mon Sep 17 00:00:00 2001
From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Sun, 15 Apr 2012 02:40:17 +0200
Subject: [PATCH] virtfs root filesystem support
Qemu/KVM provides virtfs, a paravirtualised filesystem that is
implemented by running the Plan 9 folder sharing protocol over
virtio.
Make booting with root=virtfs:foobar use the virtfs filesystem
with mount tag 'foobar' as root filesystem, to allow booting
virtual machines off virtfs.
Note that this only handles 9p over virtio (i.e. virtfs), and
doesn't attempt to handle mounting 9p filesystems over TCP/IP,
for example.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
---
dracut.spec | 1 +
modules.d/95virtfs/module-setup.sh | 27 +++++++++++++
modules.d/95virtfs/mount-virtfs.sh | 75 ++++++++++++++++++++++++++++++++++++
modules.d/95virtfs/parse-virtfs.sh | 9 +++++
4 files changed, 112 insertions(+)
create mode 100755 modules.d/95virtfs/module-setup.sh
create mode 100755 modules.d/95virtfs/mount-virtfs.sh
create mode 100755 modules.d/95virtfs/parse-virtfs.sh
diff --git a/dracut.spec b/dracut.spec
index 074cb10..9cd08b7 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -270,6 +270,7 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/95zfcp
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
+%{dracutlibdir}/modules.d/95virtfs
%{dracutlibdir}/modules.d/96securityfs
%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/97masterkey
diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh
new file mode 100755
index 0000000..a6081c2
--- /dev/null
+++ b/modules.d/95virtfs/module-setup.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+check() {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for fs in ${host_fs_types[@]}; do
+ strstr "$fs" "\|9p" && return 0
+ done
+ return 1
+ }
+
+ return 0
+}
+
+depends() {
+ return 0
+}
+
+installkernel() {
+ instmods 9p 9pnet_virtio
+}
+
+install() {
+ inst_hook cmdline 95 "$moddir/parse-virtfs.sh"
+ inst_hook mount 99 "$moddir/mount-virtfs.sh"
+}
diff --git a/modules.d/95virtfs/mount-virtfs.sh b/modules.d/95virtfs/mount-virtfs.sh
new file mode 100755
index 0000000..dfebf38
--- /dev/null
+++ b/modules.d/95virtfs/mount-virtfs.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+
+filter_rootopts() {
+ rootopts=$1
+ # strip ro and rw options
+ local OLDIFS="$IFS"
+ IFS=,
+ set -- $rootopts
+ IFS="$OLDIFS"
+ local v
+ while [ $# -gt 0 ]; do
+ case $1 in
+ rw|ro);;
+ defaults);;
+ *)
+ v="$v,${1}";;
+ esac
+ shift
+ done
+ rootopts=${v#,}
+ echo $rootopts
+}
+
+mount_root() {
+ local _ret
+
+ rootfs="9p"
+ rflags="trans=virtio,version=9p2000.L"
+
+ modprobe 9pnet_virtio
+
+ mount -t ${rootfs} -o "$rflags",ro "${root#virtfs:}" "$NEWROOT"
+
+ rootopts=
+ if getargbool 1 rd.fstab -n rd_NO_FSTAB \
+ && ! getarg rootflags \
+ && [ -f "$NEWROOT/etc/fstab" ] \
+ && ! [ -L "$NEWROOT/etc/fstab" ]; then
+ # if $NEWROOT/etc/fstab contains special mount options for
+ # the root filesystem,
+ # remount it with the proper options
+ rootopts="defaults"
+ while read dev mp fs opts rest; do
+ # skip comments
+ [ "${dev%%#*}" != "$dev" ] && continue
+
+ if [ "$mp" = "/" ]; then
+ rootopts=$opts
+ break
+ fi
+ done < "$NEWROOT/etc/fstab"
+
+ rootopts=$(filter_rootopts $rootopts)
+ fi
+
+ # we want rootflags (rflags) to take precedence so prepend rootopts to
+ # them; rflags is guaranteed to not be empty
+ rflags="${rootopts:+"${rootopts},"}${rflags}"
+
+ umount "$NEWROOT"
+
+ info "Remounting ${root#virtfs:} with -o ${rflags}"
+ mount -t ${rootfs} -o "$rflags" "${root#virtfs:}" "$NEWROOT" 2>&1 | vinfo
+
+ [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null
+ [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null
+}
+
+if [ -n "$root" -a -z "${root%%virtfs:*}" ]; then
+ mount_root
+fi
diff --git a/modules.d/95virtfs/parse-virtfs.sh b/modules.d/95virtfs/parse-virtfs.sh
new file mode 100755
index 0000000..ce6de6d
--- /dev/null
+++ b/modules.d/95virtfs/parse-virtfs.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+if [ "${root%%:*}" = "virtfs" ] ; then
+ modprobe 9pnet_virtio
+
+ rootok=1
+fi

View File

@ -0,0 +1,48 @@
From 04ab68a4dd7dada7cd5fa2afc11ce7a12275af14 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 17 Apr 2012 12:12:56 +0200
Subject: [PATCH] dracut.spec: do not include IMA and selinux modules with
systemd
---
dracut.spec | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 9cd08b7..9f64213 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -187,6 +187,14 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
# remove gentoo specific modules
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
+%if %{defined _unitdir}
+# with systemd IMA and selinux modules do not make sense
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux
+%endif
+
mkdir -p $RPM_BUILD_ROOT/boot/dracut
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
@@ -271,13 +279,15 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
%{dracutlibdir}/modules.d/95virtfs
+%if %{undefined _unitdir}
%{dracutlibdir}/modules.d/96securityfs
-%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/97masterkey
-%{dracutlibdir}/modules.d/98ecryptfs
+%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98integrity
+%endif
+%{dracutlibdir}/modules.d/97biosdevname
+%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98pollcdrom
-%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base

View File

@ -0,0 +1,67 @@
From 9f630a188942c6d235c3a747d67e44e725d8e869 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sat, 14 Apr 2012 16:03:34 +0100
Subject: [PATCH] Do not run plymouth hook if the binary is missing.
There is a remove-boot-splash script in Mageia that can
strip plymouth from an initrd. Make this script a noop
if that has happened.
---
modules.d/50plymouth/plymouth-pretrigger.sh | 44 ++++++++++++++-------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
index 57955e7..50828af 100755
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
@@ -2,27 +2,29 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
-if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
- [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
- # first trigger graphics subsystem
- udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
- # first trigger graphics and tty subsystem
- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1
+if [ -x /bin/plymouthd ]; then
+ if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
+ [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
+ # first trigger graphics subsystem
+ udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
+ # first trigger graphics and tty subsystem
+ udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1
- udevadm settle --timeout=30 2>&1 | vinfo
- [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
- [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0
- [ -e /dev/systty ] || ln -s tty0 /dev/systty
- [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0
- [ -e /dev/fb ] || ln -s fb0 /dev/fb
+ udevadm settle --timeout=30 2>&1 | vinfo
+ [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
+ [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0
+ [ -e /dev/systty ] || ln -s tty0 /dev/systty
+ [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0
+ [ -e /dev/fb ] || ln -s fb0 /dev/fb
- info "Starting plymouth daemon"
- mkdir -m 0755 /run/plymouth
- consoledev=$(getarg console= | sed -e 's/,.*//')
- consoledev=${consoledev:-tty0}
- [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev"
- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
- /bin/plymouth --show-splash 2>&1 | vinfo
- # reset tty after plymouth messed with it
- [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
+ info "Starting plymouth daemon"
+ mkdir -m 0755 /run/plymouth
+ consoledev=$(getarg console= | sed -e 's/,.*//')
+ consoledev=${consoledev:-tty0}
+ [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev"
+ [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
+ /bin/plymouth --show-splash 2>&1 | vinfo
+ # reset tty after plymouth messed with it
+ [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
+ fi
fi

View File

@ -0,0 +1,22 @@
From bd66d2b59ab4077c48478e5c616d3ee31ebc9095 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sat, 14 Apr 2012 18:14:29 +0100
Subject: [PATCH] man: Fix --add-fstab option in man page
---
dracut.8.asc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.8.asc b/dracut.8.asc
index 24b7a8c..cadd740 100644
--- a/dracut.8.asc
+++ b/dracut.8.asc
@@ -247,7 +247,7 @@ provide a valid _/etc/fstab_.
**--fstab**::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
-**--add_fstab** _<filename>_ ::
+**--add-fstab** _<filename>_ ::
Add entries of _<filename>_ to the initramfs /etc/fstab.
**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::

View File

@ -0,0 +1,28 @@
From 3ba29cde19a9e66d3ad1a74d481356168e27ddab Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 17 Apr 2012 21:25:11 +0800
Subject: [PATCH] network: move the kill-dhclient.sh hook later
kdump module uses a pre-pivot hook too, it needs networking, so
do not kill dhclient so early. kdump hook needs to find a place
where all needed fs are mounted meanwhile networking works too.
Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
modules.d/40network/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 97fc5cb..49e440e 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -85,7 +85,7 @@ 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"
- inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"
+ inst_hook pre-pivot 98 "$moddir/kill-dhclient.sh"
_arch=$(uname -m)

View File

@ -0,0 +1,59 @@
From 2369f8aa7684df0b1b0dbd1fd24823ea8d78ad13 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 18 Apr 2012 12:42:39 +0200
Subject: [PATCH] udevd moved to /lib/systemd/systemd-udevd
---
dracut.conf.d/fedora.conf.example | 1 +
modules.d/95udev-rules/module-setup.sh | 10 +++++++++-
modules.d/99base/init.sh | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example
index 02a530e..617d967 100644
--- a/dracut.conf.d/fedora.conf.example
+++ b/dracut.conf.d/fedora.conf.example
@@ -8,3 +8,4 @@ omit_drivers+=" .*/fs/ocfs/.* "
stdloglvl=3
realinitpath="/usr/lib/systemd/systemd"
install_items+=" vi /etc/virc ps grep cat rm "
+prefix="/"
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index b17232f..cc42eb7 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -8,12 +8,20 @@ install() {
# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
# of the rules we want so that we just copy those in would be best
dracut_install udevadm
- [ -x /sbin/udevd ] && dracut_install udevd
+ if [ -x /sbin/udevd ]; then
+ dracut_install udevd
+ mkdir -p ${initdir}/lib/systemd
+ ln -s /sbin/udevd ${initdir}/lib/systemd/systemd-udevd
+ elif [ -x /lib/systemd/systemd-udevd ]; then
+ inst /lib/systemd/systemd-udevd
+ fi
for i in /etc/udev/udev.conf /etc/group; do
inst_simple $i
done
+
dracut_install basename
+
inst_rules 50-udev-default.rules 60-persistent-storage.rules \
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \
60-pcmcia.rules
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
index 2f87a20..0ea72e8 100755
--- a/modules.d/99base/init.sh
+++ b/modules.d/99base/init.sh
@@ -110,7 +110,7 @@ getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Br
source_hook pre-udev
# start up udev and trigger cold plugs
-udevd --daemon --resolve-names=never
+/lib/systemd/systemd-udevd --daemon --resolve-names=never
UDEV_LOG_PRIO_ARG=--log-priority
UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"

View File

@ -0,0 +1,37 @@
From 6d25b60e719a41340adff21d4a3ef0ab525c8b5d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 18 Apr 2012 12:44:00 +0200
Subject: [PATCH] base/init.sh: mount tmpfs with strictatime
---
modules.d/99base/init.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
index 0ea72e8..65bc88f 100755
--- a/modules.d/99base/init.sh
+++ b/modules.d/99base/init.sh
@@ -46,7 +46,7 @@ if [ "$RD_DEBUG" = "yes" ]; then
fi
if ! ismounted /dev; then
- mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null
+ mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null
fi
# prepare the /dev directory
@@ -62,12 +62,12 @@ fi
if ! ismounted /dev/shm; then
mkdir -m 0755 /dev/shm
- mount -t tmpfs -o mode=1777,nosuid,nodev tmpfs /dev/shm >/dev/null
+ mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
fi
if ! ismounted /run; then
mkdir -m 0755 /newrun
- mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /newrun >/dev/null
+ mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
cp -a /run/* /newrun >/dev/null 2>&1
mount --move /newrun /run
rm -fr /newrun

View File

@ -0,0 +1,26 @@
From 4ce38419808566708beb8be2350b028b69c531d9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 18 Apr 2012 13:08:12 +0200
Subject: [PATCH] 99shutdown/shutdown.sh: export PATH
---
modules.d/99shutdown/shutdown.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
index 45345a4..aa0a81f 100755
--- a/modules.d/99shutdown/shutdown.sh
+++ b/modules.d/99shutdown/shutdown.sh
@@ -7,10 +7,9 @@
# Copyright 2011, Red Hat, Inc.
# Harald Hoyer <harald@redhat.com>
-#!/bin/sh
-. /lib/dracut-lib.sh
export TERM=linux
-PATH=/usr/sbin:/usr/bin:/sbin:/bin
+export PATH=/usr/sbin:/usr/bin:/sbin:/bin
+. /lib/dracut-lib.sh
trap "emergency_shell --shutdown shutdown Signal caught!" 0
getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown"

View File

@ -0,0 +1,26 @@
From 817ddcf053f8d068a6bf6089e25059f171cd8493 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 18 Apr 2012 13:14:55 +0200
Subject: [PATCH] Makefile: do not install systemd service in reboot
shutdown is enough. It is pulled in on reboot.
---
Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Makefile b/Makefile
index c62aae1..5ce1778 100644
--- a/Makefile
+++ b/Makefile
@@ -57,11 +57,8 @@ install: doc
if [ -n "$(systemdsystemunitdir)" ]; then \
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \
- mkdir -p $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants; \
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \
ln -s ../dracut-shutdown.service \
- $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants/dracut-shutdown.service; \
- ln -s ../dracut-shutdown.service \
$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
fi

View File

@ -10,7 +10,7 @@
Name: dracut
Version: 018
Release: 12.git20120416%{?dist}
Release: 22.git20120418%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -33,8 +33,18 @@ Patch6: 0006-rootfs-block-avoid-remount-when-options-don-t-change.patch
Patch7: 0007-Debian-multiarch-support.patch
Patch8: 0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch
Patch9: 0009-lvm-disable-lvmetad.patch
Patch10: 0010-virtfs-root-filesystem-support.patch
Patch11: 0011-udev-rules-remove-01-ignore.rules.patch
Patch10: 0010-udev-rules-remove-01-ignore.rules.patch
Patch11: 0011-lsinitrd-support-symlinks.patch
Patch12: 0012-dracut.cmdline.7.asc-document-resume-option.patch
Patch13: 0013-virtfs-root-filesystem-support.patch
Patch14: 0014-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch
Patch15: 0015-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch
Patch16: 0016-man-Fix-add-fstab-option-in-man-page.patch
Patch17: 0017-network-move-the-kill-dhclient.sh-hook-later.patch
Patch18: 0018-udevd-moved-to-lib-systemd-systemd-udevd.patch
Patch19: 0019-base-init.sh-mount-tmpfs-with-strictatime.patch
Patch20: 0020-99shutdown-shutdown.sh-export-PATH.patch
Patch21: 0021-Makefile-do-not-install-systemd-service-in-reboot.patch
BuildArch: noarch
@ -199,6 +209,14 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
# remove gentoo specific modules
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
%if %{defined _unitdir}
# with systemd IMA and selinux modules do not make sense
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux
%endif
mkdir -p $RPM_BUILD_ROOT/boot/dracut
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
@ -283,13 +301,15 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
%{dracutlibdir}/modules.d/95virtfs
%if %{undefined _unitdir}
%{dracutlibdir}/modules.d/96securityfs
%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/97masterkey
%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98integrity
%{dracutlibdir}/modules.d/98pollcdrom
%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98integrity
%endif
%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98pollcdrom
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base
@ -341,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Wed Apr 18 2012 Harald Hoyer <harald@redhat.com> 018-22.git20120418
- new upstream version
* Mon Apr 16 2012 Harald Hoyer <harald@redhat.com> 018-12.git20120416
- new upstream version, which fixes various anaconda loader issues