]> git.pld-linux.org Git - packages/openssl.git/commitdiff
- use echo in place of printf where possible to avoid weird format problems,
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 5 May 2010 11:08:54 +0000 (11:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  like %20 in filenames
 (Updating certificates in /etc/openssl/certs... printf: %202007.p: invalid
  conversion specification)

Changed files:
    openssl-c_rehash.sh -> 1.3

openssl-c_rehash.sh

index 2bddc5a24f830cef630c45b8218f425f8e3589e4..14f7e4c4f4a27be6cb2f06e7e83c2a07146aaa9b 100644 (file)
@@ -31,7 +31,7 @@ check_file()
 
     # 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 @@ link_hash()
     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 @@ link_hash()
        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 @@ link_hash()
 # hash_dir create hash links in a given directory
 hash_dir()
 {
-    printf "Doing ${1}\n"
+    echo "Doing ${1}"
 
     cd ${1}
 
@@ -165,7 +165,7 @@ hash_dir()
         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 @@ export PATH
 # 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
 
This page took 0.03896 seconds and 4 git commands to generate.