Blame 0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch

Adam Williamson 2fa76e
From dda971e5260bd2401e79461135e6c44af01da568 Mon Sep 17 00:00:00 2001
Adam Williamson 2fa76e
From: Adam Williamson <awilliam@redhat.com>
Adam Williamson 2fa76e
Date: Thu, 17 Apr 2014 18:55:31 -0700
Adam Williamson 2fa76e
Subject: [PATCH 2/2] Revert "Add flag to toggle hostonly cmdline storing in
Adam Williamson 2fa76e
 the initramfs"
Adam Williamson 2fa76e
Adam Williamson 2fa76e
This reverts commit ab9457efd78ff74c654b4123956cdbd131935066.
Adam Williamson 2fa76e
---
Adam Williamson 2fa76e
 dracut.8.asc                             |  6 ------
Adam Williamson 2fa76e
 dracut.conf.5.asc                        |  3 ---
Adam Williamson 2fa76e
 dracut.sh                                | 18 +++-------------
Adam Williamson 2fa76e
 modules.d/90crypt/module-setup.sh        |  6 ++----
Adam Williamson 2fa76e
 modules.d/90dmraid/module-setup.sh       |  6 ++----
Adam Williamson 2fa76e
 modules.d/90lvm/module-setup.sh          |  6 ++----
Adam Williamson 2fa76e
 modules.d/90mdraid/module-setup.sh       |  6 ++----
Adam Williamson 2fa76e
 modules.d/95rootfs-block/module-setup.sh | 37 ++++++++++++--------------------
Adam Williamson 2fa76e
 8 files changed, 25 insertions(+), 63 deletions(-)
Adam Williamson 2fa76e
Adam Williamson 2fa76e
diff --git a/dracut.8.asc b/dracut.8.asc
Adam Williamson 2fa76e
index 14ce26b..583a6dd 100644
Adam Williamson 2fa76e
--- a/dracut.8.asc
Adam Williamson 2fa76e
+++ b/dracut.8.asc
Adam Williamson 2fa76e
@@ -300,12 +300,6 @@ provide a valid _/etc/fstab_.
Adam Williamson 2fa76e
 **-N, --no-hostonly**::
Adam Williamson 2fa76e
     Disable Host-Only mode
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-**--hostonly-cmdline**:
Adam Williamson 2fa76e
-    Store kernel command line arguments needed in the initramfs
Adam Williamson 2fa76e
-
Adam Williamson 2fa76e
-**--no-hostonly-cmdline**:
Adam Williamson 2fa76e
-    Do not store kernel command line arguments needed in the initramfs
Adam Williamson 2fa76e
-
Adam Williamson 2fa76e
 **--persistent-policy** _<policy>_::
Adam Williamson 2fa76e
     Use _<policy>_ to address disks and partitions.
Adam Williamson 2fa76e
     _<policy>_ can be any directory name found in /dev/disk.
Adam Williamson 2fa76e
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
Adam Williamson 2fa76e
index be62da9..5c94118 100644
Adam Williamson 2fa76e
--- a/dracut.conf.5.asc
Adam Williamson 2fa76e
+++ b/dracut.conf.5.asc
Adam Williamson 2fa76e
@@ -76,9 +76,6 @@ Configuration files must have the extension .conf; other extensions are ignored.
Adam Williamson 2fa76e
     Host-Only mode: Install only what is needed for booting the local host
Adam Williamson 2fa76e
     instead of a generic host and generate host-specific configuration.
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-*hostonly_cmdline*"__{yes|no}__"::
Adam Williamson 2fa76e
-    If set, store the kernel command line arguments needed in the initramfs
Adam Williamson 2fa76e
-
Adam Williamson 2fa76e
 *persistent_policy=*"__<policy>__"::
Adam Williamson 2fa76e
     Use _<policy>_ to address disks and partitions.
Adam Williamson 2fa76e
     _<policy>_ can be any directory name found in /dev/disk.
Adam Williamson 2fa76e
diff --git a/dracut.sh b/dracut.sh
Adam Williamson 2fa76e
index 1899db9..1b33165 100755
Adam Williamson 2fa76e
--- a/dracut.sh
Adam Williamson 2fa76e
+++ b/dracut.sh
Adam Williamson 2fa76e
@@ -137,10 +137,6 @@ Creates initial ramdisk images for preloading modules
Adam Williamson 2fa76e
   -H, --hostonly        Host-Only mode: Install only what is needed for
Adam Williamson 2fa76e
                         booting the local host instead of a generic host.
Adam Williamson 2fa76e
   -N, --no-hostonly     Disables Host-Only mode
Adam Williamson 2fa76e
-  --hostonly-cmdline    Store kernel command line arguments needed
Adam Williamson 2fa76e
-                        in the initramfs
Adam Williamson 2fa76e
-  --no-hostonly-cmdline Do not store kernel command line arguments needed
Adam Williamson 2fa76e
-                        in the initramfs
Adam Williamson 2fa76e
   --persistent-policy [POLICY]
Adam Williamson 2fa76e
                         Use [POLICY] to address disks and partitions.
Adam Williamson 2fa76e
                         POLICY can be any directory name found in /dev/disk.
Adam Williamson 2fa76e
@@ -492,12 +488,9 @@ while :; do
Adam Williamson 2fa76e
         -f|--force)    force=yes;;
Adam Williamson 2fa76e
         --kernel-only) kernel_only="yes"; no_kernel="no";;
Adam Williamson 2fa76e
         --no-kernel)   kernel_only="no"; no_kernel="yes";;
Adam Williamson 2fa76e
-        --print-cmdline)
Adam Williamson 2fa76e
-                       print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
Adam Williamson 2fa76e
-        --early-microcode)
Adam Williamson 2fa76e
-                       early_microcode_l="yes";;
Adam Williamson 2fa76e
-        --no-early-microcode)
Adam Williamson 2fa76e
-                       early_microcode_l="no";;
Adam Williamson 2fa76e
+        --print-cmdline) print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
Adam Williamson 2fa76e
+        --early-microcode) early_microcode_l="yes";;
Adam Williamson 2fa76e
+        --no-early-microcode) early_microcode_l="no";;
Adam Williamson 2fa76e
         --strip)       do_strip_l="yes";;
Adam Williamson 2fa76e
         --nostrip)     do_strip_l="no";;
Adam Williamson 2fa76e
         --prelink)     do_prelink_l="yes";;
Adam Williamson 2fa76e
@@ -524,10 +517,6 @@ while :; do
Adam Williamson 2fa76e
                        hostonly_l="yes" ;;
Adam Williamson 2fa76e
         -N|--no-hostonly|--no-host-only)
Adam Williamson 2fa76e
                        hostonly_l="no" ;;
Adam Williamson 2fa76e
-        --hostonly-cmdline)
Adam Williamson 2fa76e
-                       hostonly_cmdline_l="yes" ;;
Adam Williamson 2fa76e
-        --no-hostonly-cmdline)
Adam Williamson 2fa76e
-                       hostonly_cmdline_l="no" ;;
Adam Williamson 2fa76e
         --persistent-policy)
Adam Williamson 2fa76e
                        persistent_policy_l="$2";       PARMS_TO_STORE+=" '$2'"; shift;;
Adam Williamson 2fa76e
         --fstab)       use_fstab_l="yes" ;;
Adam Williamson 2fa76e
@@ -766,7 +755,6 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
Adam Williamson 2fa76e
 [[ $prefix_l ]] && prefix=$prefix_l
Adam Williamson 2fa76e
 [[ $prefix = "/" ]] && unset prefix
Adam Williamson 2fa76e
 [[ $hostonly_l ]] && hostonly=$hostonly_l
Adam Williamson 2fa76e
-[[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l
Adam Williamson 2fa76e
 [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l
Adam Williamson 2fa76e
 [[ $use_fstab_l ]] && use_fstab=$use_fstab_l
Adam Williamson 2fa76e
 [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
Adam Williamson 2fa76e
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
Adam Williamson 2fa76e
index 5707404..21d49c4 100755
Adam Williamson 2fa76e
--- a/modules.d/90crypt/module-setup.sh
Adam Williamson 2fa76e
+++ b/modules.d/90crypt/module-setup.sh
Adam Williamson 2fa76e
@@ -51,10 +51,8 @@ cmdline() {
Adam Williamson 2fa76e
 # called by dracut
Adam Williamson 2fa76e
 install() {
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-    if [[ $hostonly_cmdline == "yes" ]]; then
Adam Williamson 2fa76e
-        cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf"
Adam Williamson 2fa76e
-        echo >> "${initdir}/etc/cmdline.d/90crypt.conf"
Adam Williamson 2fa76e
-    fi
Adam Williamson 2fa76e
+    cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf"
Adam Williamson 2fa76e
+    echo >> "${initdir}/etc/cmdline.d/90crypt.conf"
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
     inst_multiple cryptsetup rmdir readlink umount
Adam Williamson 2fa76e
     inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
Adam Williamson 2fa76e
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
Adam Williamson 2fa76e
index aebb28d..d3888a4 100755
Adam Williamson 2fa76e
--- a/modules.d/90dmraid/module-setup.sh
Adam Williamson 2fa76e
+++ b/modules.d/90dmraid/module-setup.sh
Adam Williamson 2fa76e
@@ -65,10 +65,8 @@ cmdline() {
Adam Williamson 2fa76e
 install() {
Adam Williamson 2fa76e
     local _i
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-    if [[ $hostonly_cmdline == "yes" ]]; then
Adam Williamson 2fa76e
-        cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf"
Adam Williamson 2fa76e
-        echo >> "${initdir}/etc/cmdline.d/90dmraid.conf"
Adam Williamson 2fa76e
-    fi
Adam Williamson 2fa76e
+    cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf"
Adam Williamson 2fa76e
+    echo >> "${initdir}/etc/cmdline.d/90dmraid.conf"
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
     inst_multiple dmraid
Adam Williamson 2fa76e
     inst_multiple -o kpartx
Adam Williamson 2fa76e
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
Adam Williamson 2fa76e
index 5b810b9..781dfa4 100755
Adam Williamson 2fa76e
--- a/modules.d/90lvm/module-setup.sh
Adam Williamson 2fa76e
+++ b/modules.d/90lvm/module-setup.sh
Adam Williamson 2fa76e
@@ -50,10 +50,8 @@ install() {
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
     inst lvm
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-    if [[ $hostonly_cmdline == "yes" ]]; then
Adam Williamson 2fa76e
-        cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf"
Adam Williamson 2fa76e
-        echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
Adam Williamson 2fa76e
-    fi
Adam Williamson 2fa76e
+    cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf"
Adam Williamson 2fa76e
+    echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
     inst_rules "$moddir/64-lvm.rules"
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
Adam Williamson 2fa76e
index ac745d1..7d72098 100755
Adam Williamson 2fa76e
--- a/modules.d/90mdraid/module-setup.sh
Adam Williamson 2fa76e
+++ b/modules.d/90mdraid/module-setup.sh
Adam Williamson 2fa76e
@@ -70,10 +70,8 @@ install() {
Adam Williamson 2fa76e
     inst $(command -v partx) /sbin/partx
Adam Williamson 2fa76e
     inst $(command -v mdadm) /sbin/mdadm
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-    if [[ $hostonly_cmdline == "yes" ]]; then
Adam Williamson 2fa76e
-        cmdline  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
Adam Williamson 2fa76e
-        echo  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
Adam Williamson 2fa76e
-    fi
Adam Williamson 2fa76e
+    cmdline  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
Adam Williamson 2fa76e
+    echo  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
     # 
Adam Williamson 2fa76e
     inst_rules 64-md-raid.rules
Adam Williamson 2fa76e
diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
Adam Williamson 2fa76e
index b209ab6..7bd0d2f 100755
Adam Williamson 2fa76e
--- a/modules.d/95rootfs-block/module-setup.sh
Adam Williamson 2fa76e
+++ b/modules.d/95rootfs-block/module-setup.sh
Adam Williamson 2fa76e
@@ -12,25 +12,6 @@ depends() {
Adam Williamson 2fa76e
     echo fs-lib
Adam Williamson 2fa76e
 }
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-cmdline_journal() {
Adam Williamson 2fa76e
-    if [[ $hostonly ]]; then
Adam Williamson 2fa76e
-        for dev in "${!host_fs_types[@]}"; do
Adam Williamson 2fa76e
-            [[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue
Adam Williamson 2fa76e
-            rootopts=$(find_dev_fsopts "$dev")
Adam Williamson 2fa76e
-            if [[ ${host_fs_types[$dev]} = "reiserfs" ]]; then
Adam Williamson 2fa76e
-                journaldev=$(fs_get_option $rootopts "jdev")
Adam Williamson 2fa76e
-            elif [[ ${host_fs_types[$dev]} = "xfs" ]]; then
Adam Williamson 2fa76e
-                journaldev=$(fs_get_option $rootopts "logdev")
Adam Williamson 2fa76e
-            fi
Adam Williamson 2fa76e
-
Adam Williamson 2fa76e
-            if [ -n "$journaldev" ]; then
Adam Williamson 2fa76e
-                printf " root.journaldev=%s" "$journaldev"
Adam Williamson 2fa76e
-            fi
Adam Williamson 2fa76e
-        done
Adam Williamson 2fa76e
-    fi
Adam Williamson 2fa76e
-    return 0
Adam Williamson 2fa76e
-}
Adam Williamson 2fa76e
-
Adam Williamson 2fa76e
 # called by dracut
Adam Williamson 2fa76e
 cmdline() {
Adam Williamson 2fa76e
     local dev=/dev/block/$(find_root_block_device)
Adam Williamson 2fa76e
@@ -39,14 +20,24 @@ cmdline() {
Adam Williamson 2fa76e
         printf " rootflags=%s" "$(find_mp_fsopts /)"
Adam Williamson 2fa76e
         printf " rootfstype=%s" "$(find_mp_fstype /)"
Adam Williamson 2fa76e
     fi
Adam Williamson 2fa76e
-    cmdline_journal
Adam Williamson 2fa76e
 }
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
 # called by dracut
Adam Williamson 2fa76e
 install() {
Adam Williamson 2fa76e
-    if [[ $hostonly_cmdline == "yes" ]]; then
Adam Williamson 2fa76e
-        cmdline_journal | while read journaldev; do
Adam Williamson 2fa76e
-            [[ $journaldev ]] && printf "%s\n" "$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
Adam Williamson 2fa76e
+
Adam Williamson 2fa76e
+    if [[ $hostonly ]]; then
Adam Williamson 2fa76e
+        for dev in "${!host_fs_types[@]}"; do
Adam Williamson 2fa76e
+            [[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue
Adam Williamson 2fa76e
+            rootopts=$(find_dev_fsopts "$dev")
Adam Williamson 2fa76e
+            if [[ ${host_fs_types[$dev]} = "reiserfs" ]]; then
Adam Williamson 2fa76e
+                journaldev=$(fs_get_option $rootopts "jdev")
Adam Williamson 2fa76e
+            elif [[ ${host_fs_types[$dev]} = "xfs" ]]; then
Adam Williamson 2fa76e
+                journaldev=$(fs_get_option $rootopts "logdev")
Adam Williamson 2fa76e
+            fi
Adam Williamson 2fa76e
+
Adam Williamson 2fa76e
+            if [ -n "$journaldev" ]; then
Adam Williamson 2fa76e
+                printf "%s\n" "root.journaldev=$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
Adam Williamson 2fa76e
+            fi
Adam Williamson 2fa76e
         done
Adam Williamson 2fa76e
     fi
Adam Williamson 2fa76e
 
Adam Williamson 2fa76e
-- 
Adam Williamson 2fa76e
1.9.0
Adam Williamson 2fa76e