Hi devs,

A patch that will be useful for most of my installations. I tend to need to
create my own scripts around the main makeknownhosts; but the following
patch would deffo help. This helps with host-based authentication

 --- makeknownhosts.pm.orig 2011-12-21 18:00:39.579336162 +0000
+++ makeknownhosts.pm 2011-12-21 18:33:12.631336016 +0000
@@ -250,10 +250,21 @@
     }
     chomp($ip_address);

+    my $domain;
+    my $sitetab = xCAT::Table->new('site');
+    my $stab = $sitetab->getAttribs({key=>'domain'},['value']);
+    if ($stab and $stab->{value}) {
+        $domain = $stab->{value};
+    }
+
     if (defined $hostname)
     {
         $line = "\"";
         $line .= "$hostname,";
+        if (defined $domain)
+        {
+           $line .= "$hostname.$domain,";
+        }
         $line .= "$ip_address";
         $line .= " ";
         $line .= $output[0];


regards,

--
Arif Ali

catch me on freenode IRC, username: arif-ali
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to