aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-04-01 23:49:15 -0400
committerB. Watson <yalhcru@gmail.com>2020-04-01 23:49:15 -0400
commit435021147e6e3c0fb7d1ecd3d6d7fc2051a6afbb (patch)
treea0097a28b131276982caf1f9e35f8ed309e8c17d
parentda778fe56df17bb7cf74e3cb722dbd4e4d170133 (diff)
downloadmisc-scripts-435021147e6e3c0fb7d1ecd3d6d7fc2051a6afbb.tar.gz
slacktopic.pl: use ftp URL, handle curl exit status 0
-rw-r--r--slacktopic.pl10
1 files 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");
}