fab351
From e671c3a06a7e58461d4e9c9f3546cf6eac809300 Mon Sep 17 00:00:00 2001
fab351
From: Harald Hoyer <harald@redhat.com>
fab351
Date: Tue, 4 Dec 2018 10:27:17 +0100
fab351
Subject: [PATCH] 95iscsi/module-setup.sh: do not require 'hostname' anymore
6b5521
fab351
(cherry picked from commit ebe1821635dd99f07c817179ee5358d27aab53c5)
fab351
fab351
[lkundrak@v3.sk: fixes TEST-30 that fails with: dracut: dracut module
fab351
'iscsi' will not be installed, because command 'hostname' could not be
fab351
found!]
6b5521
---
fab351
 modules.d/40network/netroot.sh               | 2 +-
fab351
 modules.d/95iscsi/module-setup.sh            | 4 ++--
fab351
 modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
fab351
 modules.d/99base/init.sh                     | 2 +-
fab351
 4 files changed, 5 insertions(+), 5 deletions(-)
6b5521
fab351
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
fab351
index 207364cd..654cfc72 100755
fab351
--- a/modules.d/40network/netroot.sh
fab351
+++ b/modules.d/40network/netroot.sh
fab351
@@ -66,7 +66,7 @@ if [ -z "$2" ]; then
fab351
 
fab351
     # Check: do we really know how to handle (net)root?
fab351
     [ -z "$root" ] && die "No or empty root= argument"
fab351
-    [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
fab351
+    [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'"
fab351
 
fab351
     handler=${netroot%%:*}
fab351
     handler=${handler%%4}
fab351
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
fab351
index 79af4a47..f6f3520d 100755
fab351
--- a/modules.d/95iscsi/module-setup.sh
fab351
+++ b/modules.d/95iscsi/module-setup.sh
fab351
@@ -4,7 +4,7 @@
fab351
 check() {
fab351
     local _rootdev
fab351
     # If our prerequisites are not met, fail anyways.
fab351
-    require_binaries hostname iscsi-iname iscsiadm iscsid || return 1
fab351
+    require_binaries iscsi-iname iscsiadm iscsid || return 1
fab351
 
fab351
     # If hostonly was requested, fail the check if we are not actually
fab351
     # booting from root.
fab351
@@ -206,7 +206,7 @@ cmdline() {
fab351
 install() {
fab351
     inst_multiple -o iscsiuio
fab351
     inst_libdir_file 'libgcc_s.so*'
fab351
-    inst_multiple umount hostname iscsi-iname iscsiadm iscsid
fab351
+    inst_multiple umount iscsi-iname iscsiadm iscsid
fab351
 
fab351
     inst_multiple -o \
fab351
         $systemdsystemunitdir/iscsid.socket \
fab351
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
fab351
index bff9435a..89c52d13 100755
fab351
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
fab351
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
fab351
@@ -76,7 +76,7 @@ case "${root}${root_unset}" in
fab351
 esac
fab351
 
fab351
 [ -z "${root}${root_unset}" ] && die "Empty root= argument"
fab351
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
fab351
+[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'"
fab351
 
fab351
 export root rflags fstype netroot NEWROOT
fab351
 
fab351
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
fab351
index e4f7cff1..3e20069f 100755
fab351
--- a/modules.d/99base/init.sh
fab351
+++ b/modules.d/99base/init.sh
fab351
@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br
fab351
 source_hook cmdline
fab351
 
fab351
 [ -z "$root" ] && die "No or empty root= argument"
fab351
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
fab351
+[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'"
fab351
 
fab351
 export root rflags fstype netroot NEWROOT
fab351
 
6b5521