Author: arekm
Date: Thu Jan 13 21:15:51 2011
New Revision: 12043

Modified:
   geninitrd/trunk/geninitrd
Log:
Don't leave temporary files if kofile ends up being empty.

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Thu Jan 13 21:15:51 2011
@@ -285,12 +285,12 @@
 #
 # Ripped and adjusted for geninitrd from linux-2.6.34/scripts/extract-ikconfig
 extract-ikconfig() {
-       local img=$(mktemp)
        local kofile=$(modinfo -k $kernel -n configs)
-       case "$kofile" in
-       '')
+       if [ -z "$kofile" ]; then
                return
-               ;;
+       fi
+       local img=$(mktemp)
+       case "$kofile" in
        *.gz)
                gzip -dc "$kofile" > $img
                ;;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to