Blame 0067-move-uefi-lib-to-a-seperate-module.patch

Harald Hoyer 30adad
From 89031be3735045ae06d560bf4f42ec58d889fe8e Mon Sep 17 00:00:00 2001
Harald Hoyer 30adad
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 30adad
Date: Thu, 12 Dec 2013 09:49:06 +0100
Harald Hoyer 30adad
Subject: [PATCH] move uefi-lib to a seperate module
Harald Hoyer 30adad
Harald Hoyer 30adad
---
Harald Hoyer 30adad
 modules.d/95fcoe-uefi/module-setup.sh        |  4 +---
Harald Hoyer 30adad
 modules.d/95fcoe/module-setup.sh             |  5 -----
Harald Hoyer 30adad
 modules.d/99base/module-setup.sh             |  1 -
Harald Hoyer 30adad
 modules.d/99uefi-lib/module-setup.sh         | 19 +++++++++++++++++++
Harald Hoyer 30adad
 modules.d/{99base => 99uefi-lib}/uefi-lib.sh |  0
Harald Hoyer 30adad
 5 files changed, 20 insertions(+), 9 deletions(-)
Harald Hoyer 30adad
 create mode 100755 modules.d/99uefi-lib/module-setup.sh
Harald Hoyer 30adad
 rename modules.d/{99base => 99uefi-lib}/uefi-lib.sh (100%)
Harald Hoyer 30adad
Harald Hoyer 30adad
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 30adad
index 007aa59..653d88e 100755
Harald Hoyer 30adad
--- a/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 30adad
+++ b/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 30adad
@@ -4,14 +4,12 @@
Harald Hoyer 30adad
 
Harald Hoyer 30adad
 # called by dracut
Harald Hoyer 30adad
 check() {
Harald Hoyer 30adad
-    [[ $hostonly ]] || [[ $mount_needs ]] && return 1
Harald Hoyer 30adad
-
Harald Hoyer 30adad
     return 0
Harald Hoyer 30adad
 }
Harald Hoyer 30adad
 
Harald Hoyer 30adad
 # called by dracut
Harald Hoyer 30adad
 depends() {
Harald Hoyer 30adad
-    echo fcoe bash
Harald Hoyer 30adad
+    echo fcoe uefi-lib
Harald Hoyer 30adad
     return 0
Harald Hoyer 30adad
 }
Harald Hoyer 30adad
 
Harald Hoyer 30adad
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
Harald Hoyer 30adad
index 2605fa0..539c464 100755
Harald Hoyer 30adad
--- a/modules.d/95fcoe/module-setup.sh
Harald Hoyer 30adad
+++ b/modules.d/95fcoe/module-setup.sh
Harald Hoyer 30adad
@@ -4,11 +4,6 @@
Harald Hoyer 30adad
 
Harald Hoyer 30adad
 # called by dracut
Harald Hoyer 30adad
 check() {
Harald Hoyer 30adad
-    # FIXME
Harald Hoyer 30adad
-    # If hostonly was requested, fail the check until we have some way of
Harald Hoyer 30adad
-    # knowing we are booting from FCoE
Harald Hoyer 30adad
-    [[ $hostonly ]] || [[ $mount_needs ]] && return 1
Harald Hoyer 30adad
-
Harald Hoyer 30adad
     for i in dcbtool fipvlan lldpad ip readlink; do
Harald Hoyer 30adad
         type -P $i >/dev/null || return 1
Harald Hoyer 30adad
     done
Harald Hoyer 30adad
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
Harald Hoyer 30adad
index e53cf2e..d4dbca9 100755
Harald Hoyer 30adad
--- a/modules.d/99base/module-setup.sh
Harald Hoyer 30adad
+++ b/modules.d/99base/module-setup.sh
Harald Hoyer 30adad
@@ -45,7 +45,6 @@ install() {
Harald Hoyer 30adad
     mkdir -p ${initdir}/tmp
Harald Hoyer 30adad
 
Harald Hoyer 30adad
     inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
Harald Hoyer 30adad
-    inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh"
Harald Hoyer 30adad
 
Harald Hoyer 30adad
     if ! dracut_module_included "systemd"; then
Harald Hoyer 30adad
         inst_multiple switch_root || dfatal "Failed to install switch_root"
Harald Hoyer 30adad
diff --git a/modules.d/99uefi-lib/module-setup.sh b/modules.d/99uefi-lib/module-setup.sh
Harald Hoyer 30adad
new file mode 100755
Harald Hoyer 30adad
index 0000000..4a856ea
Harald Hoyer 30adad
--- /dev/null
Harald Hoyer 30adad
+++ b/modules.d/99uefi-lib/module-setup.sh
Harald Hoyer 30adad
@@ -0,0 +1,19 @@
Harald Hoyer 30adad
+#!/bin/bash
Harald Hoyer 30adad
+# module-setup for img-lib
Harald Hoyer 30adad
+
Harald Hoyer 30adad
+# called by dracut
Harald Hoyer 30adad
+check() {
Harald Hoyer 30adad
+    return 255
Harald Hoyer 30adad
+}
Harald Hoyer 30adad
+
Harald Hoyer 30adad
+# called by dracut
Harald Hoyer 30adad
+depends() {
Harald Hoyer 30adad
+    echo bash
Harald Hoyer 30adad
+    return 0
Harald Hoyer 30adad
+}
Harald Hoyer 30adad
+
Harald Hoyer 30adad
+# called by dracut
Harald Hoyer 30adad
+install() {
Harald Hoyer 30adad
+    inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh"
Harald Hoyer 30adad
+}
Harald Hoyer 30adad
+
Harald Hoyer 30adad
diff --git a/modules.d/99base/uefi-lib.sh b/modules.d/99uefi-lib/uefi-lib.sh
Harald Hoyer 30adad
similarity index 100%
Harald Hoyer 30adad
rename from modules.d/99base/uefi-lib.sh
Harald Hoyer 30adad
rename to modules.d/99uefi-lib/uefi-lib.sh