[PATCH] Use quotes to preserve *.asc

Marcus Karlsson mk at acc.umu.se
Thu Nov 28 19:54:14 CET 2013


Fai-make-nfsroot is unable to locate any keys to add to the NFS root.
The shell expands *.asc before running the find command which prevents
it from running properly. As a result no keys are added to the NFS root.

Add single quotes around *.asc to prevent the shell from expanding it.
---
 bin/fai-make-nfsroot |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/fai-make-nfsroot b/bin/fai-make-nfsroot
index af0ed58..e29d7b7 100755
--- a/bin/fai-make-nfsroot
+++ b/bin/fai-make-nfsroot
@@ -447,7 +447,7 @@ upgrade_nfsroot() {
     # add any 3rd party repository keys that you may need installed into the NFSROOT
     if [ -d $cfdir/apt/keys ]; then
         local f
-        for f in `find $cfdir/apt/keys -type f -name *.asc`; do
+        for f in `find $cfdir/apt/keys -type f -name '*.asc'`; do
             cat $f | $ROOTCMD apt-key add -
         done
     fi
-- 
1.7.10.4



More information about the linux-fai-devel mailing list