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