support makeknownhosts on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15476 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
774c178272
commit
e05797bb60
@ -686,6 +686,15 @@ sub genSSHRootKeys
|
||||
"Added updates to the $cfgfile file.");
|
||||
}
|
||||
}
|
||||
if ( -e "/etc/debian_version" ){
|
||||
$out = `/bin/cat $cfgfile | grep 'HashKnownHosts'`;
|
||||
if ( $out ){
|
||||
`/bin/sed -e 's/.*HashKnownHosts.*/HashKnownHosts no/' $cfgfile > tempcfg;mv -f tempcfg $cfgfile`
|
||||
}
|
||||
else{
|
||||
`/bin/echo HashKnownHosts no >> $cfgfile`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -702,6 +711,11 @@ sub genSSHRootKeys
|
||||
{
|
||||
xCAT::MsgUtils->message('I', "Added updates to the $cfgfile file.");
|
||||
}
|
||||
#debian or ubuntu, the HashKnownHosts default is yes, change it
|
||||
if ( -e "/etc/debian_version" ){
|
||||
$cmd = "/bin/echo HashKnownHosts no >> $cfgfile";
|
||||
xCAT::Utils->runcmd("$cmd", 0);
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user