--- Em seg, 5/12/11, Bruce Dubbs <[email protected]> escreveu:

> De: Bruce Dubbs <[email protected]>
> Assunto: Re: [blfs-support] remove-expired-certs.sh
> Para: "BLFS Support List" <[email protected]>
> Data: Segunda-feira, 5 de Dezembro de 2011, 19:47
> Fernando de Oliveira wrote:
> 
> > Ok, I do not remember why, I was thinking that date
> was the source of the error.
> > 
> > Then as you asked, 
> > 
> > $ date -d "Dec 31 14:10:36 2040 GMT" +%Y%m%d
> > date: data inválida "Dec 31 14:10:36 2040 GMT"
> > 
> > The consequence, as you probably already know, is an
> empty string $certdate:
> > 
> > certdate=$( date -d "${date}" +%Y%m%d 2>/dev/null
> )
> >   if [ "${certdate}x" = "x" ]; then
> echo "${cert}"; fi
> 
> This statement changes the $? element below.

Ok, just to test, I repeate certdate=$( date -d "${date}" +%Y%m%d 2>/dev/null 
after thes ... "echo"; fi and before if [ $? != 0 ]
> 
> > # Test for date problems > 2038 on 32-bit systems
> >   if [ $? = 0 ]; then continue; fi
> 
> I think this should be !=

Changed

Now the output is:


...
Created 03f0efa4.pem
Certificate 8f111d69 is not trusted!  Removing...
certs/48ef30f1.pem is expired! Removing...
certs/0c4c9b6c.pem
certs/c47d9980.pem
certs/9c8dfbd4.pem
certs/972672fc.pem is expired! Removing...
certs/84009bc3.pem is expired! Removing...
certs/ad6c2ff9.pem is expired! Removing...
certs/b727005e.pem

Similar result in Ubuntu 32bit.


[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to