From 2de350cf803fd2180d5f70c27241cea2cd46736d Mon Sep 17 00:00:00 2001 From: xq2005 Date: Wed, 13 Mar 2013 10:11:02 +0000 Subject: [PATCH] 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 --- xCAT-server/sbin/xcatconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 523ef15ba..d70e7da93 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -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