dracut/0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch

27 lines
983 B
Diff
Raw Normal View History

From 5e5f3d5e6c9d94996c9a28bf38f26a4d463c4dd4 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Sat, 25 Feb 2012 16:06:16 +0100
Subject: [PATCH] 95nfs/module-setup.sh: removed "egrep" and "ls" calls
---
modules.d/95nfs/module-setup.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 7aedb4d..7853783 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -54,7 +54,11 @@ install() {
_nsslibs=${_nsslibs#|}
_nsslibs=${_nsslibs%|}
- dracut_install $(for _i in $(ls {/usr,}$libdir/libnss*.so 2>/dev/null); do echo $_i;done | egrep "$_nsslibs")
+ for _i in {/usr,}$libdir/libnss*.so; do
+ [[ -e $_i ]] || continue
+ [[ "$_i" =~ $_nsslibs ]] || continue
+ dracut_install "$_i"
+ done
inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh"