From 91f5346d2ffcafb3ff1df09384fbf10b0130301f Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 7 Jan 2025 19:07:06 +0100 Subject: [PATCH] s --- conf/openbsd-7.3-aarch64.conf | 7 +++++++ conf/openbsd-7.4-aarch64.conf | 2 +- conf/openbsd-7.5-aarch64.conf | 1 + conf/openbsd-7.6-aarch64.conf | 2 +- enablessh.txt | 7 +++++++ hooks/postBuild.sh | 8 ++++++++ 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/conf/openbsd-7.3-aarch64.conf b/conf/openbsd-7.3-aarch64.conf index 769124c..3361673 100644 --- a/conf/openbsd-7.3-aarch64.conf +++ b/conf/openbsd-7.3-aarch64.conf @@ -21,6 +21,13 @@ VM_LOGIN_TAG="penBSD/arm64" VM_ARCH=aarch64 VM_USE_CONSOLE_BUILD=1 +VM_USE_SSHROOT_BUILD_SSH=1 +#After install from the img file file, and reboot the new vm, the vm doesn't output to the vnc conosole, it only outputs to serial port +#so, we can not use vnc console to initialize sshd settings(vncdotool to login and input). +#we use sshpass to login to the server to initialize sshd settings, with "VM_USE_SSHROOT_BUILD_SSH=1" +VM_NO_VNC_BUILD=1 + + VM_OPTS="conf/openbsd-7.3-aarch64.resp" diff --git a/conf/openbsd-7.4-aarch64.conf b/conf/openbsd-7.4-aarch64.conf index 60a2fe0..de06ecc 100644 --- a/conf/openbsd-7.4-aarch64.conf +++ b/conf/openbsd-7.4-aarch64.conf @@ -21,7 +21,7 @@ VM_LOGIN_TAG="penBSD/arm64" VM_ARCH=aarch64 VM_USE_CONSOLE_BUILD=1 - +VM_USE_SSHROOT_BUILD_SSH=1 VM_OPTS="conf/openbsd-7.4-aarch64.resp" diff --git a/conf/openbsd-7.5-aarch64.conf b/conf/openbsd-7.5-aarch64.conf index 7f46558..d68e777 100644 --- a/conf/openbsd-7.5-aarch64.conf +++ b/conf/openbsd-7.5-aarch64.conf @@ -21,6 +21,7 @@ VM_LOGIN_TAG="penBSD/arm64" VM_ARCH=aarch64 VM_USE_CONSOLE_BUILD=1 +VM_USE_SSHROOT_BUILD_SSH=1 VM_OPTS="conf/openbsd-7.5-aarch64.resp" diff --git a/conf/openbsd-7.6-aarch64.conf b/conf/openbsd-7.6-aarch64.conf index af74cd7..3874d0d 100644 --- a/conf/openbsd-7.6-aarch64.conf +++ b/conf/openbsd-7.6-aarch64.conf @@ -21,7 +21,7 @@ VM_LOGIN_TAG="penBSD/arm64" VM_ARCH=aarch64 VM_USE_CONSOLE_BUILD=1 - +VM_USE_SSHROOT_BUILD_SSH=1 VM_OPTS="conf/openbsd-7.6-aarch64.resp" diff --git a/enablessh.txt b/enablessh.txt index 2ebc952..5a05f64 100644 --- a/enablessh.txt +++ b/enablessh.txt @@ -13,8 +13,15 @@ mkdir -p ~/.ssh chmod -R 600 ~/.ssh +rm -f ~/.ssh/id_rsa + ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N "" echo "StrictHostKeyChecking=accept-new" >>~/.ssh/config + + + + + diff --git a/hooks/postBuild.sh b/hooks/postBuild.sh index c55ce1a..fb4573a 100644 --- a/hooks/postBuild.sh +++ b/hooks/postBuild.sh @@ -4,6 +4,13 @@ echo 'pkg_scripts=""' >>/etc/rc.conf.local +while ps aux | grep "[m]ake newbsd"; do + echo "reorder_kernel is running, just wait" + sleep 5 +done + +echo "OK, start syspatch" +sleep 10 syspatch @@ -12,6 +19,7 @@ ret="$?" #2 means no update if [ "$ret" != "2" ] && [ "$ret" != "0" ]; then echo "update error" + ps aux exit $ret fi