support makeknownhosts on debian/ubuntu

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15478 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2013-03-13 10:11:02 +00:00
parent 2ce147d84b
commit 2de350cf80

View File

@ -689,11 +689,12 @@ sub genSSHRootKeys
if ( -e "/etc/debian_version" ){
my $out = `/bin/cat $cfgfile | grep 'HashKnownHosts'`;
if ( $out ){
`/bin/sed -e 's/.*HashKnownHosts.*/HashKnownHosts no/' $cfgfile > tempcfg;mv -f tempcfg $cfgfile`
`/bin/sed -e 's/.*HashKnownHosts.*/HashKnownHosts no/' $cfgfile > tempcfg;mv -f tempcfg $cfgfile`;
}
else{
`/bin/echo HashKnownHosts no >> $cfgfile`;
}
`chmod 600 $cfgfile`;
}
}
else