packages: openssl/openssl-c_rehash.sh - use echo in place of printf where p...

baggins baggins at pld-linux.org
Wed May 5 13:09:00 CEST 2010


Author: baggins                      Date: Wed May  5 11:09:00 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use echo in place of printf where possible to avoid weird format problems,
  like %20 in filenames
 (Updating certificates in /etc/openssl/certs... printf: %202007.p: invalid 
  conversion specification)

---- Files affected:
packages/openssl:
   openssl-c_rehash.sh (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/openssl/openssl-c_rehash.sh
diff -u packages/openssl/openssl-c_rehash.sh:1.2 packages/openssl/openssl-c_rehash.sh:1.3
--- packages/openssl/openssl-c_rehash.sh:1.2	Mon Nov  3 14:04:03 2008
+++ packages/openssl/openssl-c_rehash.sh	Wed May  5 13:08:54 2010
@@ -31,7 +31,7 @@
 
     # make IFS a newline so we can process grep output line by line
     local OLDIFS=${IFS}
-    IFS=$( printf "\n" )
+    IFS="\n"
 
     # XXX: could be more efficient to have two 'grep -m' but is -m portable?
     for LINE in $( grep '^-----BEGIN .*-----' ${1} )
@@ -106,7 +106,7 @@
     do
 	if [ ${FINGERPRINT} = $( fingerprint ${LINKFILE} ${2} ) ]
 	then
-	    printf "WARNING: Skipping duplicate file ${1}\n" >&2
+	    echo "WARNING: Skipping duplicate file ${1}" >&2
 	    return 1
 	fi	
 
@@ -114,7 +114,7 @@
 	LINKFILE=${HASH}.${TAG}${SUFFIX}
     done
 
-    printf "${1} => ${LINKFILE}\n"
+    echo "${1} => ${LINKFILE}"
 
     # assume any system with a POSIX shell will either support symlinks or
     # do something to handle this gracefully
@@ -127,7 +127,7 @@
 # hash_dir create hash links in a given directory
 hash_dir()
 {
-    printf "Doing ${1}\n"
+    echo "Doing ${1}"
 
     cd ${1}
 
@@ -165,7 +165,7 @@
         then
             TYPE_STR='crl'
         else
-            printf "WARNING: ${FILE} does not contain a certificate or CRL: skipping\n" >&2
+            echo "WARNING: ${FILE} does not contain a certificate or CRL: skipping" >&2
 	    continue
         fi
 
@@ -191,7 +191,7 @@
 # confirm existance/executability of ssl command
 if ! [ -x $( which ${SSL_CMD} ) ]
 then
-    printf "${0}: rehashing skipped ('openssl' program not available)\n" >&2
+    echo "${0}: rehashing skipped ('openssl' program not available)" >&2
     exit 0
 fi
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openssl/openssl-c_rehash.sh?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list