Update from samosa: Declare the local directory as library (in order to
[mirror/userdir-ldap-cgi.git] / machines.cgi
index e0ee813..938e330 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: machines.cgi,v 1.8 2000/08/20 02:32:46 tausq Exp $
+# $Id: machines.cgi,v 1.10 2001/12/03 05:02:13 rmurray Exp $
 
 # (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
 
@@ -27,16 +27,17 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder);
          'bandwidth' => 'Bandwidth',
          'status' => 'Status',
          'notes' => 'Notes',
+         'sshrsahostkey' => 'SSH host key',
          'description' => 'Description',
          'createtimestamp' => 'Entry created',
          'modifytimestamp' => 'Entry modified'
         );
 
 # This defines what fields are displayed, and in what order
-@attrorder = ('hostname', 'admin', 'architecture', 'distribution', 'access',
-              'sponsor', 'sponsor-admin', 'location', 'machine', 'memory',
-             'disk', 'bandwidth', 'status', 'notes', 'description',
-             'createtimestamp', 'modifytimestamp');
+@attrorder = qw(hostname admin architecture distribution access
+                sponsor sponsor-admin location machine memory
+               disk bandwidth status notes sshrsahostkey
+               description createtimestamp modifytimestamp);
 
 # ditto for summary
 %summaryattrs = ('hostname' => 'Host name',
@@ -95,6 +96,11 @@ foreach $dn (sort {$entries->{$a}->{host}->[0] cmp $entries->{$b}->{host}->[0]}
     # Format email addresses
     $output{admin} = sprintf("<a href=\"mailto:%s\">%s</a>", $output{admin}, $output{admin});
     $output{'sponsor-admin'} = sprintf("<a href=\"mailto:%s\">%s</a>", $output{'sponsor-admin'}, $output{'sponsor-admin'});
+
+    $output{sshrsahostkey} = undef;
+    foreach $key (@{$data->{sshrsahostkey}}) {
+      $output{sshrsahostkey} .= $key . "<br>";
+    }
     
     # URL
     my ($sponsor, $url) = undef;