[PATCH 1/2] Copy command line files prior to pivot

Jesse Keating jkeating at redhat.com
Tue Sep 18 23:28:53 UTC 2012


We need these after the pivot and we can't get to them without copying
them into /run ourselves.
---
 dracut/Makefile.am              | 1 +
 dracut/anaconda-copy-cmdline.sh | 5 +++++
 dracut/module-setup.sh          | 1 +
 3 files changed, 7 insertions(+)
 create mode 100755 dracut/anaconda-copy-cmdline.sh

diff --git a/dracut/Makefile.am b/dracut/Makefile.am
index 8c56bf3..cb38e75 100644
--- a/dracut/Makefile.am
+++ b/dracut/Makefile.am
@@ -33,6 +33,7 @@ dist_dracut_SCRIPTS = module-setup.sh \
 		      anaconda-netroot.sh \
 		      anaconda-diskroot \
 		      anaconda-copy-ks.sh \
+		      anaconda-copy-cmdline.sh \
 		      fetch-kickstart-net.sh \
 		      fetch-kickstart-disk \
 		      fetch-updates-disk \
diff --git a/dracut/anaconda-copy-cmdline.sh b/dracut/anaconda-copy-cmdline.sh
new file mode 100755
index 0000000..26aa340
--- /dev/null
+++ b/dracut/anaconda-copy-cmdline.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Copy over cmdline(.d) files from the initrd to /run before pivot
+mkdir -p /run/install/cmdline.d
+cp /etc/cmdline.d/* /run/install/cmdline.d/
+cp /etc/cmdline /run/install/
diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh
index 7705f1b..be2bd71 100755
--- a/dracut/module-setup.sh
+++ b/dracut/module-setup.sh
@@ -30,6 +30,7 @@ install() {
     inst_hook initqueue/online 80 "$moddir/anaconda-netroot.sh"
     inst "$moddir/anaconda-diskroot" "/sbin/anaconda-diskroot"
     inst_hook pre-pivot 99 "$moddir/anaconda-copy-ks.sh"
+    inst_hook pre-pivot 99 "$moddir/anaconda-copy-cmdline.sh"
     # kickstart parsing, WOOOO
     inst_hook initqueue/online 10 "$moddir/fetch-kickstart-net.sh"
     inst "$moddir/fetch-kickstart-disk" "/sbin/fetch-kickstart-disk"
-- 
1.7.11.4



More information about the anaconda-patches mailing list