Blame SOURCES/0112-move-uefi-lib-to-a-seperate-module.patch

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