From nobody Mon Dec 16 12:01:20 2024 X-Original-To: rc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YBdns3MbRz5hLqw for ; Mon, 16 Dec 2024 12:01:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YBdns1t6Nz41Y8 for ; Mon, 16 Dec 2024 12:01:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734350481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rf36rBy87D2EG9Pog2yLmrvo8db3N8JQVmWAshOCyDg=; b=C3Cv/v0lefdy+dmK8UZkC8SmvyzRQHubWd5bctG1k45nnBCtLztWBDjAfqF+fSAve0Ja6H CN0//Rjsvha7uTrSt739UaVUCeOhAFv/s0qd+h/sZF94daDBt1rVvaibUKs29xabHEtnhN Pk9Zt4ynAWOHW2F20IhjVm1JouthbX0KGbaLpRKVazxxBXIjFaORl+jjeBUV35P5tPV22/ wS0kKDloU4A8CER381PVTV12XHzNkBtlJ8LX22TIdh7MMDUUq1dnHlA5hxrw6dVVygVdsL VvgNOJAjTuGOS/OM2OFMEyIxdGvErLsnHbgyQ2oUeKc62rGkQwikChynJeTYVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734350481; a=rsa-sha256; cv=none; b=QbpDd5Oh7Vw8Z8H2zPUxwFGU2/GFMrkTvVvgQO1x+tq6PeQSy4SrKlV0USBS+IZPT4xBf/ QUTl1ws3nZennJLKAsE1j55i6YE+8//skr+Co2ga2SGNLW44G5Pr2euGHuw75nfy2dWl3R KyoErlBcuNlaqSAeFmElb57UAwb0c9cSK7hR7Nw8Tzqo0LFU92sci6O+J8Wd6BkSDXJuHT RL5Wo6hIF2/tI49rZL/xUJZGdoegBWzD7IgEczrgka2VvtBuRhR3Yxd2O3bP9Q08f9tKLv wCUF3ETAoLIiQ3gE1Atcqwyok9CSc7sS3WLHVWfV2I2kqxv0pfuajF/v7zEOkw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YBdns1TdvzsqL for ; Mon, 16 Dec 2024 12:01:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4BGC1LZ6077726 for ; Mon, 16 Dec 2024 12:01:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BGC1LKQ077703 for rc@FreeBSD.org; Mon, 16 Dec 2024 12:01:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: rc@FreeBSD.org Subject: [Bug 261036] rc.d/jail: Support multiple _startN and _stopN variables Date: Mon, 16 Dec 2024 12:01:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: crest@rlwinm.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: rc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion related to /etc/rc.d design and implementation List-Archive: https://lists.freebsd.org/archives/freebsd-rc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-rc@freebsd.org Sender: owner-freebsd-rc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261036 crest@rlwinm.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crest@rlwinm.de --- Comment #3 from crest@rlwinm.de --- As of FreeBSD 14.0 you can have your cake and eat it to when it comes to templating jail configurations (e.g. with Ansible). The idea is to use a /etc/jail.conf that uses a .include directive with a glob pattern that matc= hes all active jails kept inside a single directory. e.g. `.include "/etc/jail.d/*.conf;`. You can repeat this recursively if you don't want to emit the whole jail configuration from a single ansible template (maybe bec= ause you assemble the jail piece by piece using multiple roles). In that case you would have a skeleton config in /etc/jail.d/jail123.conf that includes the different parts of the jail: jail123 { .include "/etc/jail.d/jail123.d/*.conf"; } This way you can just use the jail(8) command without having to provide all= the jail parameters on the CLI or going through the rc.d script. It also allows using depend (pseudo-)parameter. In my opinion your clever workaround has been overcome by events and is no longer needed except on FreeBSD 13.x. PSA: If you decide to use .include don't use /etc/jail.conf.d for your jail configurations to include because it triggers the old per jail "jail -f $pa= th" logic in the jail rc.d script. --=20 You are receiving this mail because: You are the assignee for the bug.=