From bc98f3fb4c6836d5ca8ddb3cacf5a2eb4e2a7dfc Mon Sep 17 00:00:00 2001 From: tonetto Date: Thu, 29 Sep 2011 14:55:14 +0000 Subject: [PATCH] Adding a distro test to start sshd service correctly on Ubuntu. Tracked by Bug 3415378 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10674 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/remoteshell | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 5c9396048..0166103a1 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -145,6 +145,20 @@ fi # start up the sshd for syncfiles postscript to do the sync work logger -t xCAT "start up sshd" -service sshd start + +DISTRO=`lsb_release -si` +if [ $DISTRO = "Ubuntu" ] +then + if [ ! -d /var/run/sshd ] + then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + /usr/sbin/sshd -f /etc/ssh/sshd_config + else + service ssh restart + fi +else + service sshd start +fi kill -9 $CREDPID