From 435021147e6e3c0fb7d1ecd3d6d7fc2051a6afbb Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 1 Apr 2020 23:49:15 -0400 Subject: slacktopic.pl: use ftp URL, handle curl exit status 0 --- slacktopic.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/slacktopic.pl b/slacktopic.pl index d5e060b..e8a787b 100644 --- a/slacktopic.pl +++ b/slacktopic.pl @@ -81,7 +81,7 @@ our %IRSSI = ( # nobody but the author will ever run it...) # Print verbose debugging messages in local irssi window? -our $DEBUG = 1; +our $DEBUG = 0; # For testing, fake the date. 0 = use the real ChangeLog date. If you # set this, it *must* match /\d\d\d\d-\d\d-\d\d/. @@ -92,8 +92,11 @@ our $FAKE = 0; # the plain http URL, not https (which doesn't even exist). Actually, # ftp would also work, but then you got the whole passive vs. active # firewall mess. +# 20190920 bkw: old URL quit working: +#our $changelog_url = + #"http://ftp.slackware.com/pub/slackware/slackware64-14.2/ChangeLog.txt"; our $changelog_url = - "http://ftp.slackware.com/pub/slackware/slackware64-14.2/ChangeLog.txt"; + "ftp://ftp.osuosl.org/pub/slackware/slackware-14.2/ChangeLog.txt"; # Max time curl will spend trying to do its thing. It'll give up after # this many seconds, if it can't download the ChangeLog. @@ -395,7 +398,8 @@ sub is_security_update { # 23 is "error writing output" (from curl man page), this is expected # when we close the read pipe. If we get any other error, it's worth # complaining about. - if($curl_exit != 23) { + # Also, exit status 0 (success) isn't worth griping about. + if(($curl_exit != 23) && ($curl_exit != 0)) { errmsg("curl exited with unexpected status: $curl_exit"); } -- cgit v1.2.3