remove exit from ssh_setup.*sh

This commit is contained in:
wesley800
2022-09-15 11:54:50 +08:00
parent 8c0710e412
commit 692effd5c3
2 changed files with 2 additions and 12 deletions

View File

@@ -5,12 +5,7 @@
set _UID=`id -u`
if ( $_UID < 500 && $_UID != 0 ) then
exit
endif
if ( ! -f "$HOME/.ssh/config" && ! -f "$HOME/.ssh/cluster" ) then
if ( ( $_UID > 500 || $_UID == 0 ) && ( ! -f "$HOME/.ssh/config" && ! -f "$HOME/.ssh/cluster" ) ) then
echo "Configuring SSH for cluster access"
install -d -m 700 $HOME/.ssh
ssh-keygen -t rsa -f $HOME/.ssh/cluster -N '' -C "Warewulf Cluster key" >& /dev/null

View File

@@ -13,12 +13,7 @@
_UID=`id -u`
if [ $_UID -lt 500 -a $_UID -ne 0 ]; then
exit
fi
if [ ! -f "$HOME/.ssh/config" -a ! -f "$HOME/.ssh/cluster" ]; then
if [ $_UID -ge 500 -o $_UID -eq 0 ] && [ ! -f "$HOME/.ssh/config" -a ! -f "$HOME/.ssh/cluster" ]; then
echo "Configuring SSH for cluster access"
install -d -m 700 $HOME/.ssh
ssh-keygen -t rsa -f $HOME/.ssh/cluster -N '' -C "Warewulf Cluster key" > /dev/null 2>&1