show server ip and netmask
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 30 Jul 2009 16:26:54 +0000 (16:26 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 30 Jul 2009 16:26:54 +0000 (16:26 +0000)
lib/PXElator/html.pm
lib/PXElator/httpd.pm
lib/PXElator/pxe.pm

index 7c37ae5..83737b5 100644 (file)
@@ -11,6 +11,10 @@ sub table {
        $html .= qq{</tr>\n</table>};
 }
 
+sub tt {
+       qq|<tt>| . join(' ', @_) . qq|</tt>|;
+}
+
 warn "loaded";
 
 1;
index 7891c91..331569a 100644 (file)
@@ -23,7 +23,7 @@ our $port = 7777;
 our $debug = 1;
 
 use server;
-our $url = "http://$server::ip:$port/";
+our $url = "http://$server::ip:$port";
 
 use html;
 
@@ -106,10 +106,12 @@ sub get_request {
 
                print $client $ok,
                html::table( 2,
-                       'pid',    $$,
-                       'debug',  qq|<a href=/our/debug/| . boolean::toggle($debug) . qq|>$debug</a>|,
-                       'screen', qq|<a href=/screen>$screen</a>|,
-                       'kvm',    qq|<a href=/kvm>$kvm</a>|,
+                       'pid',          html::tt( $$ ),
+                       'ip',           html::tt( $server::ip ),
+                       'netmask',      html::tt( $server::netmask ),
+                       'debug',        qq|<a href=/our/debug/| . boolean::toggle($debug) . qq|>$debug</a>|,
+                       'screen',       qq|<a href=/screen>$screen</a>|,
+                       'kvm',          qq|<a href=/kvm>$kvm</a>|,
                );
 
        } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {
index a0f8055..353c711 100644 (file)
@@ -15,8 +15,8 @@ symlink '/usr/lib/syslinux/gpxelinux.0', $path unless -l $path;
 warn "file $path ", -s $path;
 
 my $url = $httpd::url;
-$url = "tftp://$server::ip/"; # fallback to tftp
-$url = "http://$server::ip/pxelator/";
+#$url = "tftp://$server::ip/"; # fallback to tftp
+#$url = "http://$server::ip/pxelator/";
 
 my $squash = tftpd::path('debian-live/*squashfs');