FreeBSD Bugzilla – Attachment 243096 Details for
Bug 272282
freebsd-update tries to restart sshd although it is not running
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
rc.subr(8): for service status don't check whether it is enabled
0001-rc.subr-8-for-service-status-don-t-check-whether-it-.patch (text/plain), 1.62 KB, created by
Daniel Tameling
on 2023-07-01 09:17:56 UTC
(
hide
)
Description:
rc.subr(8): for service status don't check whether it is enabled
Filename:
MIME Type:
Creator:
Daniel Tameling
Created:
2023-07-01 09:17:56 UTC
Size:
1.62 KB
patch
obsolete
>From 89c844d8ea8d76687e0e83c05f9e04f8b8bf40be Mon Sep 17 00:00:00 2001 >From: Daniel Tameling <tamelingdaniel@gmail.com> >Date: Sat, 1 Jul 2023 10:43:40 +0200 >Subject: [PATCH] rc.subr(8): for service status don't check whether it is > enabled > >For a service that sets an rcvar, there is a check whether it has been >enabled before the actual command is executed. If the check fails, one >gets a message to enable it and the returned exit status is 0. >However, this is usually undesirable for the status command, which is >a) supposed to check whether the service is running anyway and b) >returns a non-zero exit code if that is not the case. >Thus, skip the check for the status command. >--- > libexec/rc/rc.subr | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr >index 6a7f070f7f5..f84b9b6745f 100644 >--- a/libexec/rc/rc.subr >+++ b/libexec/rc/rc.subr >@@ -1042,13 +1042,14 @@ run_rc_command() > continue > fi > # if ${rcvar} is set, $1 is not "rcvar", "describe", >- # "enable" or "delete", and ${rc_pid} is not set, run: >+ # "enable", "delete" or "status", and ${rc_pid} is >+ # not set, run: > # checkyesno ${rcvar} > # and return if that failed > # > if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ > -a "$rc_arg" != "delete" -a "$rc_arg" != "enable" \ >- -a "$rc_arg" != "describe" ] || >+ -a "$rc_arg" != "describe" -a "$rc_arg" != "status" ] || > [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then > if ! checkyesno ${rcvar}; then > if [ -n "${rc_quiet}" ]; then >-- >2.40.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272282
: 243096