From eec05162f54a47ab73e3f62964f5af95faae8b61 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Wed, 10 May 2017 10:59:29 +0800 Subject: [PATCH] fix issue2726 remoteshell failed in line 488 in statelite (#3017) * fix issue2726 remoteshell failed in line 488 in statelite * polished based on comments * polished based on comments --- xCAT/postscripts/remoteshell | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 5e5805b52..6bbcf8ce2 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -485,10 +485,12 @@ else #service sshd restart # sshd is not enabled on SLES 12 by default # does not hurt anything to re-enable if it is enabled already - enableservice sshd + # and disable enable service for diskless and statelite + if [ "$NODESETSTATE" = install ]; then + enableservice sshd + fi restartservice sshd fi - #if the service restart with "service/systemctl" failed #try to kill the process and start if [ "$?" != "0" ];then