* [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service
@ 2024-10-29 23:19 Vladimir Oltean
2024-10-31 8:04 ` Thomas Petazzoni via buildroot
2024-11-20 20:54 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2024-10-29 23:19 UTC (permalink / raw)
To: buildroot; +Cc: Angelo Compagnucci
The systemd service deployed to the target is derived from an example
hardcoded for the /usr/local/sbin/ path, but we install sshguard at
/usr/sbin/. Thus, by default we get this error message:
$ journalctl -b -u sshguard.service -f
systemd[1]: Started SSHGuard - blocks brute-force login attempts.
(sshguard)[612]: sshguard.service: Unable to locate executable '/usr/local/sbin/sshguard': No such file or directory
(sshguard)[612]: sshguard.service: Failed at step EXEC spawning /usr/local/sbin/sshguard: No such file or directory
systemd[1]: sshguard.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: sshguard.service: Failed with result 'exit-code'.
systemd[1]: sshguard.service: Scheduled restart job, restart counter is at 5.
systemd[1]: sshguard.service: Start request repeated too quickly.
systemd[1]: sshguard.service: Failed with result 'exit-code'.
systemd[1]: Failed to start SSHGuard - blocks brute-force login attempts.
Fix up the path in the service after the $(INSTALL) command has run.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
package/sshguard/sshguard.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/sshguard/sshguard.mk b/package/sshguard/sshguard.mk
index 8d036357438d..97cbbb2bdd3a 100644
--- a/package/sshguard/sshguard.mk
+++ b/package/sshguard/sshguard.mk
@@ -25,6 +25,8 @@ endef
define SSHGUARD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/examples/sshguard.service \
$(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
+ $(SED) 's:/usr/local/sbin/sshguard:/usr/sbin/sshguard:g' \
+ $(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
endef
$(eval $(autotools-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service
2024-10-29 23:19 [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service Vladimir Oltean
@ 2024-10-31 8:04 ` Thomas Petazzoni via buildroot
2024-11-20 20:54 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-31 8:04 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: buildroot, Angelo Compagnucci
On Wed, 30 Oct 2024 01:19:36 +0200
Vladimir Oltean <olteanv@gmail.com> wrote:
> The systemd service deployed to the target is derived from an example
> hardcoded for the /usr/local/sbin/ path, but we install sshguard at
> /usr/sbin/. Thus, by default we get this error message:
>
> $ journalctl -b -u sshguard.service -f
> systemd[1]: Started SSHGuard - blocks brute-force login attempts.
> (sshguard)[612]: sshguard.service: Unable to locate executable '/usr/local/sbin/sshguard': No such file or directory
> (sshguard)[612]: sshguard.service: Failed at step EXEC spawning /usr/local/sbin/sshguard: No such file or directory
> systemd[1]: sshguard.service: Main process exited, code=exited, status=203/EXEC
> systemd[1]: sshguard.service: Failed with result 'exit-code'.
> systemd[1]: sshguard.service: Scheduled restart job, restart counter is at 5.
> systemd[1]: sshguard.service: Start request repeated too quickly.
> systemd[1]: sshguard.service: Failed with result 'exit-code'.
> systemd[1]: Failed to start SSHGuard - blocks brute-force login attempts.
>
> Fix up the path in the service after the $(INSTALL) command has run.
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> package/sshguard/sshguard.mk | 2 ++
> 1 file changed, 2 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service
2024-10-29 23:19 [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service Vladimir Oltean
2024-10-31 8:04 ` Thomas Petazzoni via buildroot
@ 2024-11-20 20:54 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-11-20 20:54 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: buildroot, Angelo Compagnucci
>>>>> "Vladimir" == Vladimir Oltean <olteanv@gmail.com> writes:
> The systemd service deployed to the target is derived from an example
> hardcoded for the /usr/local/sbin/ path, but we install sshguard at
> /usr/sbin/. Thus, by default we get this error message:
> $ journalctl -b -u sshguard.service -f
> systemd[1]: Started SSHGuard - blocks brute-force login attempts.
> (sshguard)[612]: sshguard.service: Unable to locate executable '/usr/local/sbin/sshguard': No such file or directory
> (sshguard)[612]: sshguard.service: Failed at step EXEC spawning /usr/local/sbin/sshguard: No such file or directory
> systemd[1]: sshguard.service: Main process exited, code=exited, status=203/EXEC
> systemd[1]: sshguard.service: Failed with result 'exit-code'.
> systemd[1]: sshguard.service: Scheduled restart job, restart counter is at 5.
> systemd[1]: sshguard.service: Start request repeated too quickly.
> systemd[1]: sshguard.service: Failed with result 'exit-code'.
> systemd[1]: Failed to start SSHGuard - blocks brute-force login attempts.
> Fix up the path in the service after the $(INSTALL) command has run.
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Committed to 2024.02.x and 2024.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-20 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-29 23:19 [Buildroot] [PATCH] package/sshguard: patch /usr/local/sbin/sshguard path in systemd service Vladimir Oltean
2024-10-31 8:04 ` Thomas Petazzoni via buildroot
2024-11-20 20:54 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox