On 25/01/2024 20.48, Ilya Leoshkevich wrote:
After console_sshd_config(), the SSH server needs to be nudged to pick
up the new configs. The scripts for the other BSD flavors already do
this with a reboot, but a simple reload is sufficient.

Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com>
---
  tests/vm/freebsd | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index b581bd17fb7..9971bc1f2b2 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -108,6 +108,8 @@ class FreeBSDVM(basevm.BaseVM):
          prompt = "root@freebsd:~ #"
          self.console_ssh_init(prompt, "root", self._config["root_pass"])
          self.console_sshd_config(prompt)
+        self.console_wait(prompt)
+        self.console_send("service sshd reload\n")

Could be simplified to:

        self.console_wait_send(prompt, "service sshd reload\n")

 Thomas


Reply via email to