From dc2ae3fb9b4a434a6103fddef43db6dbf298ae28 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Thu, 11 May 2017 13:44:11 +0800 Subject: [PATCH] disable the 'sshd enablement' for diskless and statelite (#3027) * fix issue2726 remoteshell failed in line 488 in statelite * polished based on comments * polished based on comments * fix sles12 failure --- xCAT/postscripts/remoteshell | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 6bbcf8ce2..3832208c5 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -466,7 +466,6 @@ fi # start up the sshd for syncfiles postscript to do the sync work logger -t xcat -p local4.info "start up sshd" - if [[ $OSVER == ubuntu* || $OSVER == debian* ]] then if [ ! -d /var/run/sshd ];then @@ -486,7 +485,7 @@ else # sshd is not enabled on SLES 12 by default # does not hurt anything to re-enable if it is enabled already # and disable enable service for diskless and statelite - if [ "$NODESETSTATE" = install ]; then + if [[ "$NODESETSTATE" != netboot && "$NODESETSTATE" != statelite ]]; then enableservice sshd fi restartservice sshd @@ -498,5 +497,4 @@ if [ "$?" != "0" ];then [ -n "$PIDLIST" ] && kill 9 $PIDLIST /usr/sbin/sshd fi - kill -9 $CREDPID