diff mbox series

[2/3] tests/vm/freebsd: Reload the sshd configuration

Message ID 20240125194840.1564-3-iii@linux.ibm.com
State New
Headers show
Series make vm-build-freebsd fixes | expand

Commit Message

Ilya Leoshkevich Jan. 25, 2024, 7:48 p.m. UTC
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 <iii@linux.ibm.com>
---
 tests/vm/freebsd | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth Jan. 31, 2024, 12:46 p.m. UTC | #1
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 <iii@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
diff mbox series

Patch

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")
 
         # setup virtio-blk #1 (tarfile)
         self.console_wait(prompt)