@@ -377,7 +377,7 @@ if [ -e "hooks/postBuild.sh" ]; then
377377
378378 # wait for the sshd to start
379379 _retry=0
380- while ! timeout 2 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR $osname exit > /dev/null 2>&1 ; do
380+ while ! timeout 5 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR $osname exit > /dev/null 2>&1 ; do
381381 echo " ssh is not ready, just wait."
382382 sleep 10
383383 _retry=$(( $_retry + 1 ))
397397ssh $osname ' cat ~/.ssh/id_rsa.pub' > $output -id_rsa.pub
398398
399399
400- if [ -z " $VM_NO_REBOOT_CRONTAB " ]; then
400+ if [ " $VM_ENABLE_REBOOT_CRONTAB " ]; then
401401
402402# upload reboot.sh
403403if [ -e " hooks/reboot.sh" ]; then
@@ -442,7 +442,7 @@ crontab -l
442442
443443EOF
444444
445- # VM_NO_REBOOT_CRONTAB
445+ # VM_ENABLE_REBOOT_CRONTAB
446446
447447fi
448448
@@ -498,7 +498,7 @@ if [ -z "$VM_RSYNC_PKG$VM_SSHFS_PKG" ]; then
498498else
499499 $vmsh addSSHAuthorizedKeys $output -id_rsa.pub
500500 $vmsh startVM $osname
501- if [ -z " $VM_NO_REBOOT_CRONTAB " ]; then
501+ if [ " $VM_ENABLE_REBOOT_CRONTAB " ]; then
502502 $vmsh waitForVMReady $osname
503503 else
504504 while ! timeout 5 ssh $osname exit ; do
@@ -544,11 +544,17 @@ else
544544 # it's /boot/home
545545 ssh $osname mkdir -p ' $HOME/work'
546546 ssh $osname ls -lah ' $HOME'
547+ echo " ======Show ssh config: "
548+ ssh $osname cat /boot/system/settings/ssh/sshd_config
547549 else
548550 # check if the /home dir is writable
549551 ssh $osname mkdir -p $HOME /work
550552 ssh $osname ls -lah $HOME
553+ echo " ======Show ssh config: "
554+ ssh $osname cat /etc/ssh/sshd_config
551555 fi
556+
557+
552558fi
553559
554560echo " Build finished."
0 commit comments