From nobody Wed Jan 17 12:38:03 2024 X-Original-To: dev-commits-src-main@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 4TFQQN17YNz57lM6; Wed, 17 Jan 2024 12:38:04 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TFQQN08JBz4n3P; Wed, 17 Jan 2024 12:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705495084; 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; bh=ZL4HlGt11sjBEMEBTo/vTG3p8RID8ly9YiX+oxHYlnU=; b=K8J8pqkBRrAJwotCQjgJeHibUPnCkP489ucJ3KkiF+m/Z4fW8Oi8jUD3mUixBIuOqQyzse h32rYZj6yd6vmf3Gqnrf/zyfLUxdEoeXepF2e2IViUbSWqW5MnFq/NwURq/JuNiRYcBWL9 yBoonHuYs7f9B32iMhdXJErsNAgWoz3TH+cjCmNaOLCShvgMYuVkascH4WrF0V2AEAay9V Mj85Pu6ROKlwXhugzIS2mwAayY+qaBsc1R+fWGJ3dER78ythsjnyl4TFkMsWsH8VvhUPxa s1uZtz3aMcdfBuLD84C7kPsAzj9YBoOuNsrwY4Hg7/+xvmxVAN50HzVMcPBKzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705495084; 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; bh=ZL4HlGt11sjBEMEBTo/vTG3p8RID8ly9YiX+oxHYlnU=; b=oLJpKraDe3uBbDYjh7QDqyqJfPMMQRYZdTHDd3WT9J62tfn7k4xztPFaroNabSkSvQbDe6 XibvCnfGRPWhBmXDkFAhSIRRD6slcI5KQivfdkYkkX2R0ztboQFjqFFbHM/O7uy2qFNumZ 5jqgj1pR1kFkHvy1DGiUUy4KDIO9Ghpald6WrZWRK7D/XxLAsOFgSnAiw5ODBBxrVzFCr1 h5TWkbp2SnV3JaIOjN2qWLfmv8sLbuQd8DqW8M9rSBFYQ3Zah+//GWfAi2cp1eHaG3ThZR dGFZKcgDkyTaxS+6PtlAmvcy0du51P8ysNBLsaOFFY4c+K89CUl2b53FyazqKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705495084; a=rsa-sha256; cv=none; b=LNik6NS36Bt2RZAhT27v2g9M4AVcqoA0koQXjR1Fl6hv94EBvFdCWm3frHHlZL1WkRwYAx E7rzAxkOGr9JoKmFttBWoxeKqrHqXQtsfdHDw//ud+0ax4OxMJ2xFRaJ4CzwAYaMWSpK+X Hl6GVJ17iwpm9ztIZEABZahZX0+EXkBONAaUvaMs3syC23L7jMMIacnTUDEzHOoZgOaPIS 312sWxWG1p73P2fzEJRl2hUlYz+LmmQRBYjaEcvz3rFYrUNY18dKQ0xfKC42Ni37QOCUmy MuMOikjfB3KDt8uUPDqR0rsj6pMydV6tLYbAFM6cjQiOjxV0+pCrRuHpAjvOKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4TFQQM6D2CzNL8; Wed, 17 Jan 2024 12:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40HCc39f074186; Wed, 17 Jan 2024 12:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40HCc3Ex074182; Wed, 17 Jan 2024 12:38:03 GMT (envelope-from git) Date: Wed, 17 Jan 2024 12:38:03 GMT Message-Id: <202401171238.40HCc3Ex074182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: 0b49e504a32d - main - rc.d/jail: add legacy compatibility for zfs.dataset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b49e504a32d90ccd6785841bced2ca8c93a87e6 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=0b49e504a32d90ccd6785841bced2ca8c93a87e6 commit 0b49e504a32d90ccd6785841bced2ca8c93a87e6 Author: Alexander Leidinger AuthorDate: 2024-01-17 12:32:39 +0000 Commit: Alexander Leidinger CommitDate: 2024-01-17 12:38:00 +0000 rc.d/jail: add legacy compatibility for zfs.dataset Evaluate the jail_${jailname}_zfs_dataset variable for legacy jail managers. This variable can take a space separated list of datasets. The singular was used specially to allow unmaintained jail managers like ezjail to use this (simply rename jail_${jailname}_zfs_datasets in the ezjail config to jail_${jailname}_zfs_dataset). --- libexec/rc/rc.d/jail | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index f12dae280bb0..e24d6f8e21e0 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -268,6 +268,13 @@ parse_options() extract_var $_jv enforce_statfs enforce_statfs - 2 extract_var $_jv osreldate osreldate extract_var $_jv osrelease osrelease + + _zfs_dataset="$(eval echo \$jail_${_jv}_zfs_dataset)" + if [ -n "$_zfs_dataset" ]; then + for ds in $_zfs_dataset; do + echo " zfs.dataset += ${ds};" + done + fi for _p in $_parameters; do echo " ${_p%\;};" done