[blfs-book] r9381 - trunk/BOOK/postlfs/security

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sat Feb 11 20:17:45 PST 2012


Author: bdubbs
Date: 2012-02-11 21:17:41 -0700 (Sat, 11 Feb 2012)
New Revision: 9381

Modified:
   trunk/BOOK/postlfs/security/cacerts.xml
Log:
Fix remove-expired-certs.sh script

Modified: trunk/BOOK/postlfs/security/cacerts.xml
===================================================================
--- trunk/BOOK/postlfs/security/cacerts.xml	2012-02-12 03:58:59 UTC (rev 9380)
+++ trunk/BOOK/postlfs/security/cacerts.xml	2012-02-12 04:17:41 UTC (rev 9381)
@@ -252,6 +252,8 @@
   local d=$( echo $1 | cut -d" " -f2 )
   local m
 
+  if [ ${d} -lt 10 ]; then d="0${d}"; fi
+
   case $M in
     Jan) m="01";;
     Feb) m="02";;
@@ -283,10 +285,10 @@
 for cert in $certs; do
   notafter=$( $OPENSSL x509 -enddate -in "${cert}" -noout )
   date=$( echo ${notafter} |  sed 's/^notAfter=//' )
-  mydate "date"
+  mydate "$date"
 
   if [ ${certdate} -lt ${today} ]; then
-     echo "${cert} is expired! Removing..."
+     echo "${cert} expired on ${certdate}! Removing..."
      rm -f "${cert}"
   fi
 done




More information about the blfs-book mailing list