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