mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-12-10 19:19:56 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user