--- Em seg, 5/12/11, Fernando de Oliveira <[email protected]> escreveu:
> De: Fernando de Oliveira <[email protected]> > Assunto: Re: [blfs-support] remove-expired-certs.sh > Para: "BLFS Support List" <[email protected]> > Data: Segunda-feira, 5 de Dezembro de 2011, 20:31 > --- Em seg, 5/12/11, Fernando de > Oliveira <[email protected]> > escreveu: > > > De: Fernando de Oliveira <[email protected]> > > Assunto: Re: [blfs-support] remove-expired-certs.sh > > Para: "BLFS Support List" <[email protected]> > > Data: Segunda-feira, 5 de Dezembro de 2011, 20:11 > > --- 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 > > > Sorry, I had not updated properly > /bin/remove-expired-certs.sh > > Changed test line to: > > if [ "${certdate}x" = "x" ]; then echo empty > "${cert}"; fi > > > $ uname -a > Linux VMWLFS68 3.1.4 #1 SMP Wed Nov 30 19:44:56 BRT 2011 > i686 GNU/Linux > > ... > Certificate 8f111d69 is not trusted! Removing... > certs/48ef30f1.pem is expired! Removing... > empty certs/0c4c9b6c.pem > empty certs/c47d9980.pem > empty certs/9c8dfbd4.pem > certs/972672fc.pem is expired! Removing... > certs/84009bc3.pem is expired! Removing... > certs/ad6c2ff9.pem is expired! Removing... > empty certs/b727005e.pem > > > $ uname -a > Linux ...Ubuntu 3.0.0-13-generic-pae #22-Ubuntu SMP Wed Nov > 2 15:17:35 UTC 2011 i686 i686 i386 GNU/Linux > > ... > Certificate 8f111d69 is not trusted! Removing... > empty certs/c47d9980.pem > empty certs/9c8dfbd4.pem > certs/ad6c2ff9.pem is expired! Removing... > certs/972672fc.pem is expired! Removing... > empty certs/b727005e.pem > certs/84009bc3.pem is expired! Removing... > empty certs/0c4c9b6c.pem > certs/48ef30f1.pem is expired! Removing... > > > Therefore, it removes correctly, but still, four $certdate > are empty. > > []s, > Fernando $ uname -a Linux ...Ubuntu 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 16:11:24 UTC 2011 x86_64 GNU/Linux Created 6adf0799.pem certs/256fd83b.pem is expired! Removing... certs/e7461595.pem is expired! Removing... certs/f6caef89.pem is expired! Removing... certs/54edfa5d.pem is expired! Removing... certs/25a062f7.pem is expired! Removing... Thus, it works properly in x86_64, as you and DJ expected. No empty strings $certdate. []s, Fernando -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
