All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Ed Maste" <emaste@freebsd.org>, "Li-Wen Hsu" <lwhsu@freebsd.org>,
	"Warner Losh" <imp@bsdimp.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Kyle Evans" <kevans@freebsd.org>,
	qemu-devel@nongnu.org, "Ilya Leoshkevich" <iii@linux.ibm.com>
Subject: [PATCH v2 2/4] tests/vm/freebsd: Reload the sshd configuration
Date: Mon,  5 Feb 2024 19:11:33 +0100	[thread overview]
Message-ID: <20240205181352.1567-3-iii@linux.ibm.com> (raw)
In-Reply-To: <20240205181352.1567-1-iii@linux.ibm.com>

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index b581bd17fb7..1247f40a385 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -81,50 +81,51 @@ class FreeBSDVM(basevm.BaseVM):
         self.console_wait("Full name")
         self.console_send("%s\n" % self._config["guest_user"])
         self.console_wait_send("Uid",                   "\n")
         self.console_wait_send("Login group",           "\n")
         self.console_wait_send("Login group",           "\n")
         self.console_wait_send("Login class",           "\n")
         self.console_wait_send("Shell",                 "\n")
         self.console_wait_send("Home directory",        "\n")
         self.console_wait_send("Home directory perm",   "\n")
         self.console_wait_send("Use password",          "\n")
         self.console_wait_send("Use an empty password", "\n")
         self.console_wait_send("Use a random password", "\n")
         self.console_wait("Enter password:")
         self.console_send("%s\n" % self._config["guest_pass"])
         self.console_wait("Enter password again:")
         self.console_send("%s\n" % self._config["guest_pass"])
         self.console_wait_send("Lock out",              "\n")
         self.console_wait_send("OK",                    "yes\n")
         self.console_wait_send("Add another user",      "no\n")
         self.console_wait_send("~ #", "exit\n")
 
         # setup qemu user
         prompt = "$"
         self.console_ssh_init(prompt, self._config["guest_user"], self._config["guest_pass"])
         self.console_wait_send(prompt, "exit\n")
 
         # setup root user
         prompt = "root@freebsd:~ #"
         self.console_ssh_init(prompt, "root", self._config["root_pass"])
         self.console_sshd_config(prompt)
+        self.console_wait_send(prompt, "service sshd reload\n")
 
         # setup virtio-blk #1 (tarfile)
         self.console_wait(prompt)
         self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n")
 
         pkgs = self.get_qemu_packages_from_lcitool_json()
         self.print_step("Installing packages")
         self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs))
 
         # shutdown
         self.ssh_root(self.poweroff)
         self.wait()
 
         if os.path.exists(img):
             os.remove(img)
         os.rename(img_tmp, img)
         self.print_step("All done")
 
 if __name__ == "__main__":
     sys.exit(basevm.main(FreeBSDVM, config=FREEBSD_CONFIG))
-- 
2.43.0



  parent reply	other threads:[~2024-02-05 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 18:11 [PATCH v2 0/4] make vm-build-freebsd fixes Ilya Leoshkevich
2024-02-05 18:11 ` [PATCH v2 1/4] tests/vm: Set UseDNS=no in the sshd configuration Ilya Leoshkevich
2024-02-05 18:11 ` Ilya Leoshkevich [this message]
2024-02-05 18:54   ` [PATCH v2 2/4] tests/vm/freebsd: Reload " Thomas Huth
2024-02-05 18:11 ` [PATCH v2 3/4] tests/test-util-filemonitor: Adapt to FreeBSD inotify rename semantics Ilya Leoshkevich
2024-02-05 18:11 ` [PATCH v2 4/4] meson: Link with libinotify on FreeBSD Ilya Leoshkevich
2024-02-05 18:36   ` Philippe Mathieu-Daudé
2024-02-05 18:55     ` Ilya Leoshkevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240205181352.1567-3-iii@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=emaste@freebsd.org \
    --cc=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=lwhsu@freebsd.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.