From 21e53eeaffcac0be3427b7edb3b8739344a65174 Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 30 Aug 2026 11:44:55 +0200 Subject: [PATCH] rc.subr: svcj - let svcj_all_enable enable service jails Fix the logic for svcj_all_enable. Fixes: 2efbd480f1d3 rc: add service jails framework MFC after: 1 week MFC to: stable/15 --- libexec/rc/rc.conf | 2 ++ libexec/rc/rc.subr | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index e7ce22822515..41820cd26330 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -766,6 +766,8 @@ jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails jail_reverse_stop="NO" # Stop jails in reverse order +svcj_all_enable="NO" # Run all services in a service jail unless + # they are explicitly excluded ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 061611709628..9b72bd5e9c7b 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1172,8 +1172,9 @@ run_rc_command() if [ -z "$_svcj" ]; then _svcj=${svcj_all_enable} if [ -z "$_svcj" ]; then - eval ${name}_svcj=NO + _svcj=NO fi + eval ${name}_svcj=$_svcj fi # setup pid check command