Commit 0ef1c381 authored by Jondy Zhao's avatar Jondy Zhao

Remove timeout when configure node is over.

The init-slapos-node.bat isn't generated.
parent 324b9072
...@@ -27,7 +27,7 @@ echo "Start re6stent (pid:$!)in the background OK." ...@@ -27,7 +27,7 @@ echo "Start re6stent (pid:$!)in the background OK."
# Run slapformat # Run slapformat
echo "Initializing SlapOS Node ..." echo "Initializing SlapOS Node ..."
/bin/bash --login -i /opt/slapos/bin/slapos node format -c --now /opt/slapos/bin/slapos node format -c --now
if (( $? )) ; then if (( $? )) ; then
echo "Initialize SlapOS Node failed." echo "Initialize SlapOS Node failed."
else else
......
...@@ -25,11 +25,11 @@ else ...@@ -25,11 +25,11 @@ else
cp /etc/passwd /etc/passwd.orig cp /etc/passwd /etc/passwd.orig
fi fi
sed -i -e "s/Administrator:unused:500:/Administrator:unused:0:/g" /etc/passwd # sed -i -e "s/Administrator:unused:500:/Administrator:unused:0:/g" /etc/passwd
grep -q "^root:" /etc/passwd grep -q "^root:" /etc/passwd
if (( $? != 0 )) ; then if (( $? != 0 )) ; then
myaccount=$(grep "^Administrator:" /etc/passwd | \ myaccount=$(grep "^Administrator:" /etc/passwd | \
sed -e "s/Administrator:/root:/g") sed -e "s/Administrator:unused:500:/root:unused:0:/g")
if [[ "${myaccount:0:4}" == root ]] ; then if [[ "${myaccount:0:4}" == root ]] ; then
echo $myaccount >> /etc/passwd echo $myaccount >> /etc/passwd
else else
......
...@@ -74,5 +74,5 @@ sed -i -e "s%^cert_file.*$%cert_file = $client_certificate_file%" \ ...@@ -74,5 +74,5 @@ sed -i -e "s%^cert_file.*$%cert_file = $client_certificate_file%" \
$client_configure_file $client_configure_file
echo SlapOS Client configure successfully. echo SlapOS Client configure successfully.
read -n 1 -t 10 -p "Press any key to exit..." read -n 1 -p "Press any key to exit..."
exit 0 exit 0
...@@ -264,7 +264,7 @@ password_file=/etc/passwd ...@@ -264,7 +264,7 @@ password_file=/etc/passwd
password_orig=/etc/slapos-format-passwd.orig password_orig=/etc/slapos-format-passwd.orig
cygroot=$(cygpath -w -a /) cygroot=$(cygpath -w -a /)
echo "Add ${init_script}.sh as Windows startup item." echo "Add ${init_script}.sh as Windows startup item."
[[ -f ${init_script}.bat ]] && cat <<EOF > ${init_script}.bat [[ ! -f ${init_script}.bat ]] && cat <<EOF > ${init_script}.bat
@ECHO OFF @ECHO OFF
SETLOCAL SETLOCAL
...@@ -288,5 +288,5 @@ regtool -q set "$run_key\\$slapos_run_entry" \ ...@@ -288,5 +288,5 @@ regtool -q set "$run_key\\$slapos_run_entry" \
show_error_exit "Add startup item failed." show_error_exit "Add startup item failed."
echo SlapOS Node configure successfully. echo SlapOS Node configure successfully.
read -n 1 -t 10 -p "Press any key to exit..." read -n 1 -p "Press any key to exit..."
exit 0 exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment