]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe: install hba.conf and libhbalinux only if hba.conf exists
authorHarald Hoyer <harald@redhat.com>
Mon, 7 Aug 2017 12:45:55 +0000 (14:45 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 7 Aug 2017 12:45:55 +0000 (14:45 +0200)
modules.d/95fcoe/module-setup.sh

index 531ea0d79b5c87a4cdf8859d1eb59046631da280..e14a0ebb3bdcdf438cbbf204c76201e3e91bde30 100755 (executable)
@@ -68,8 +68,10 @@ cmdline() {
 # called by dracut
 install() {
     inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm
-    inst_libdir_file 'libhbalinux.so*'
-    inst "/etc/hba.conf" "/etc/hba.conf"
+    if [ -e "/etc/hba.conf" ]; then
+        inst_libdir_file 'libhbalinux.so*'
+        inst_simple "/etc/hba.conf"
+    fi
 
     mkdir -m 0755 -p "$initdir/var/lib/lldpad"
     mkdir -m 0755 -p "$initdir/etc/fcoe"