ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/ihost-perl/ihost.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/ihost.pl (file contents):
Revision 1.5 by pjm2, Fri Jan 26 17:41:48 2001 UTC vs.
Revision 1.7 by pjm2, Mon Jan 29 09:04:18 2001 UTC

# Line 1 | Line 1
1 < #!/usr/local/bin/perl -w
1 > #!/usr/bin/perl -w
2  
3   # -----------------------------------------------------------
4   # Perl i-scream Host.
# Line 88 | Line 88 | sub tcp_configure() {
88      chop $response;
89      $last_modified = $response;
90      
91 <    print "Config last modified: ". scalar localtime $last_modified . "\n";
91 >    print "Config last modified: ". (scalar localtime $last_modified/1000) . "\n";
92  
93      print $sock "FILELIST\n";
94      $response = <$sock>;
# Line 107 | Line 107 | sub tcp_configure() {
107      chop $response;
108      $tcp_update_time = $response;
109      
110 <    print "UDP packet period: $udp_update_time seconds.\nTCP heartbeat period: $tcp_update_time.\n";
110 >    print "UDP packet period: $udp_update_time seconds.\nTCP heartbeat period: $tcp_update_time seconds.\n";
111  
112      print $sock "ENDCONFIG\n";
113      $response = <$sock>;
# Line 171 | Line 171 | sub send_udp_packet() {
171      my($hostname) = hostname();
172      $hostname =~ s/\..*$//g;
173      my($domainname) = `cat /etc/resolv.conf`;
174 <    $domainname =~ s/domain\s*([^\s]*?)/$1/;
174 >    $domainname =~ /domain\s+([^\s]+)/;
175 >    $domainname = $1;
176      my($machine_name) = "$hostname.$domainname";
177      my($ip) = inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost');
178  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines