Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/4] Refactor OpenSSH init.d script
@ 2024-07-02 16:57 Fiona Klute via buildroot
  2024-07-02 16:57 ` [Buildroot] [PATCH v2 1/4] package/openssh: don't kill open sessions on restart Fiona Klute via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Fiona Klute via buildroot @ 2024-07-02 16:57 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute (WIWA)

From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

This series is the result of running "/etc/init.d/S50sshd restart"
over an SSH connection and finding that not only it destroyed my SSH
session (this is no longer issue with OpenSSH 9.8), the SSH server
also did not come back up. The main issue there was the use of
"killall sshd" instead of stopping only the listening server (patch
1). I assume restarting the SSH server on a Buildroot-created system
is not a common use case, I need a reload to reset its state during
automated tests.

I took the opportunity to make some more improvements: style cleanup
(patch 2), implementing "reload" using SIGHUP (patch 3), and checking
for errors during service start (patch 4).

The added checks for a currently running service before start/stop is
a slight change in behavior, there will be a non-zero exit code when
trying to start when sshd is already running, or stop when it's not. I
consider this useful to find errors in scripts instead of masking
them, but I don't mind removing that if it's considered a problem.

It'd be easy enough to remove the checkpatch error about
DAEMON/PIDFILE variables, too, but I'm not sure if that would make
sense: While the PIDFILE matches the required pattern it's not set by
the init script, it's the sshd default.

Changes v1 -> v2:
* Acknowledge changed session binary with OpenSSH 9.8 in commit
  message (patch 1)
* Check sshd exit code on service start (patch 4)

Fiona Klute (WIWA) (4):
  package/openssh: don't kill open sessions on restart
  package/openssh: fix init script indentation
  package/openssh: implement "reload" using SIGHUP
  package/openssh: check error conditions on "start"

 .checkpackageignore     |  2 +-
 package/openssh/S50sshd | 69 ++++++++++++++++++++++++++++++-----------
 2 files changed, 52 insertions(+), 19 deletions(-)

--
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-07-05  7:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 16:57 [Buildroot] [PATCH v2 0/4] Refactor OpenSSH init.d script Fiona Klute via buildroot
2024-07-02 16:57 ` [Buildroot] [PATCH v2 1/4] package/openssh: don't kill open sessions on restart Fiona Klute via buildroot
2024-07-02 20:15   ` Yann E. MORIN
2024-07-03  7:01     ` Arnout Vandecappelle via buildroot
2024-07-03 15:46       ` Fiona Klute via buildroot
2024-07-04  8:00         ` Arnout Vandecappelle via buildroot
2024-07-04  8:21           ` Fiona Klute via buildroot
2024-07-04  8:58             ` Arnout Vandecappelle via buildroot
2024-07-04 10:25               ` Fiona Klute via buildroot
2024-07-05  7:39                 ` Arnout Vandecappelle via buildroot
2024-07-02 16:57 ` [Buildroot] [PATCH v2 2/4] package/openssh: fix init script indentation Fiona Klute via buildroot
2024-07-02 16:57 ` [Buildroot] [PATCH v2 3/4] package/openssh: implement "reload" using SIGHUP Fiona Klute via buildroot
2024-07-02 16:57 ` [Buildroot] [PATCH v2 4/4] package/openssh: check error conditions on "start" Fiona Klute via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox