projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.tar.gz
[xscreensaver]
/
hacks
/
ljlatest
diff --git
a/hacks/ljlatest
b/hacks/ljlatest
index 2af69a2f2921f0bca8fe8947b762aa9c0e5b88a6..c0856fda12bb98a93a2cab1b02820b95510dc183 100755
(executable)
--- a/
hacks/ljlatest
+++ b/
hacks/ljlatest
@@
-27,7
+27,7
@@
use Text::Wrap qw(wrap);
use bytes; # Larry can take Unicode and shove it up his ass sideways.
my $progname = $0; $progname =~ s@.*/@@g;
use bytes; # Larry can take Unicode and shove it up his ass sideways.
my $progname = $0; $progname =~ s@.*/@@g;
-my $version = q{ $Revision: 1.
8
$ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.
9
$ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
my $verbose = 0;
my $verbose = 0;
@@
-275,14
+275,19
@@
sub lj_latest {
$|=1; # unbuffer stdout
$|=1; # unbuffer stdout
- if ($verbose) {
- $_ = $url;
- s@^[a-z]+:/+([^/?\#]+).*$@$1@;
- my $host = $_;
- print STDOUT "Contacting $host...";
- }
+ $_ = $url;
+ s@^[a-z]+:/+([^/?\#]+).*$@$1@;
+ my $host = $_;
+
+ print STDOUT "Contacting $host..." if ($verbose);
my ($http, $head, $body) = get_document ($url);
my ($http, $head, $body) = get_document ($url);
+
+ if (!$body) {
+ print STDOUT "$progname: no response from $host\n";
+ return;
+ }
+
print STDOUT "\n\n" if ($verbose);
# $body = `cat /tmp/last`;
print STDOUT "\n\n" if ($verbose);
# $body = `cat /tmp/last`;