summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-07-01 11:36:48 +0100
committerSam James <sam@gentoo.org>2024-07-01 11:36:48 +0100
commit1f9842efa122bc2fa6db472a42ef9772f290cf9c (patch)
tree02c67d60ddbe80d9f0372fe89f4bff66822b77e0 /net-misc/openssh
parentnet-misc/openssh: restart sshd on major version upgrades (diff)
downloadgentoo-1f9842efa122bc2fa6db472a42ef9772f290cf9c.tar.gz
gentoo-1f9842efa122bc2fa6db472a42ef9772f290cf9c.tar.bz2
gentoo-1f9842efa122bc2fa6db472a42ef9772f290cf9c.zip
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@gentoo.org>
Diffstat (limited to 'net-misc/openssh')
-rw-r--r--net-misc/openssh/openssh-9.8_p1-r1.ebuild3
1 files changed, 3 insertions, 0 deletions
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'"