commit:     1f9842efa122bc2fa6db472a42ef9772f290cf9c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 10:36:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 10:36:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f9842ef

net-misc/openssh: explain why we don't need to do `sshd -t` for the OpenRC case

ago pointed out that it's confusing.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/openssh/openssh-9.8_p1-r1.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net-misc/openssh/openssh-9.8_p1-r1.ebuild 
b/net-misc/openssh/openssh-9.8_p1-r1.ebuild
index 9a15dd231570..6633e212c19c 100644
--- a/net-misc/openssh/openssh-9.8_p1-r1.ebuild
+++ b/net-misc/openssh/openssh-9.8_p1-r1.ebuild
@@ -422,6 +422,9 @@ openssh_maybe_restart() {
                systemctl try-restart sshd
                eend $?
        elif [[ -d /run/openrc ]]; then
+               # We don't check for sshd -t here because the OpenRC init script
+               # has a stop_pre() which does checkconfig, i.e. we defer to it
+               # to give nicer output for a failed sanity check.
                ewarn "The ebuild will now attempt to restart OpenSSH to avoid"
                ewarn "bricking the running instance. See bug #709748."
                ebegin "Attempting to restart openssh via 'rc-service -q 
--ifstarted --nodeps sshd restart'"

Reply via email to