From nobody Sat Jan 27 23:26:31 2024 X-Original-To: freebsd-questions@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 4TMrLD3T2nz597cj for ; Sat, 27 Jan 2024 23:26:44 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMrLC3lVFz4P0s for ; Sat, 27 Jan 2024 23:26:43 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-42a9c3f31e0so67231cf.1 for ; Sat, 27 Jan 2024 15:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706398002; x=1707002802; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=J0xFmhrPdNSNrCXToQuArCyG2CNfFXrSUY5fOiWwjDM=; b=ORrZIRUzG7V6Lf3OZx+mTYds+rqz21mLsmuStvRq12zXg/dkMmJoX0B/WNLkd1XzVm xCGMJQ7fdIsbvNIkYbF2GjIt1aI4/3YCyq/Bdk9V68iQTka5l8nLIitVyuG5Uk68idVv BAYURVYy1q3hDrihITgUC0MaN9MOisPAiAwjic7PTYwlZCLgp03V+jCkkmq3vR21C/ux yEaheVger3ERGn30rKTv6BFHW2BMDw6o9VXyupvK5SDDnuQEyEqq3Y1M0QFKxOt+D5Rb bC2GN2r2clRtfw3IIaNsLuRZfpQVnDSwU9JYHmj7aPKfT9q6C6rjlKehOYWISHEJQ3ET UsXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706398002; x=1707002802; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J0xFmhrPdNSNrCXToQuArCyG2CNfFXrSUY5fOiWwjDM=; b=O7sYZ6V0xFckGfDpv6Fm/KWN1HB1BpfTxv+MFrJ65076TCqypNyHhCoiqclLH755cv 330woinumVXttAE/Yhcn+odGIsmjhv95dX5atDISwHSD3nbsijQUM1GNUeSdxX4upRG5 ik0LtezSo9AnDxFez6p+JjqtVwk2wrrbIjPg5IT2rgxjXaxsqqoBvf9e40+oxDLwk5bo XvdwPB6V4usAnlzSLMmGRi99ocBaD9VCREsFcg38xcOK7jMsP2GTOdRY/ZBSn+hSR5Zj HxxDJk+XVJuN7rBzKrXKqvqVYuP1FsBegj4OmX+zhcgX68rc+imino5E/nOsJFfYOl0I HgNw== X-Gm-Message-State: AOJu0YxriEbhzB7pI73Az6iIcz2OXxXG3zZl257CK4MFxoKoch1oaeSz Hie3+z2Mv7mYl3qiRL2xggCn3NC+d8rmCvw9CqSqur1u7phnAfcp X-Google-Smtp-Source: AGHT+IE6Q2IiSYtI8BaV3faX58JpCv7xnW1R6b7XPDWmVvkrWI/Y+tUNGGDyVM5UvpjmZy0ZB7kjkw== X-Received: by 2002:a05:620a:462c:b0:783:bfe6:74c with SMTP id br44-20020a05620a462c00b00783bfe6074cmr4076673qkb.6.1706398002410; Sat, 27 Jan 2024 15:26:42 -0800 (PST) Received: from smtpclient.apple ([2600:4041:797e:1e00:5971:bddb:ab62:eb40]) by smtp.gmail.com with ESMTPSA id x14-20020ae9f80e000000b007815e176d44sm1756417qkh.64.2024.01.27.15.26.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Jan 2024 15:26:42 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: Moving /etc/rc.conf.local to /usr/local/etc/rc.conf From: Juan Manuel Palacios In-Reply-To: <44v87egz3b.fsf@be-well.ilk.org> Date: Sat, 27 Jan 2024 18:26:31 -0500 Cc: John Levine , freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20240106214844.5B9DA7FE2A02@ary.qy> <158D9F44-5633-4B4E-A781-834574F42F67@gmail.com> <73678f67-e49f-365a-da09-5575619d736b@iecc.com> <44v87egz3b.fsf@be-well.ilk.org> To: Lowell Gilbert X-Mailer: Apple Mail (2.3774.400.31) X-Rspamd-Queue-Id: 4TMrLC3lVFz4P0s X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] > On Jan 27, 2024, at 6:01=E2=80=AFPM, Lowell Gilbert = wrote: >=20 > Juan Manuel Palacios writes: >=20 > For most people, it doesn't defeat that purpose. Keeping /etc the same > on all your machines is something plenty of people want to do, but > not putting anything into /etc/rc.conf is not by any means the only = (or > even the obvious) way to do that. My use case here is automating the creation of a number of = purpose-specific jails, and keeping all configurations to = /usr/local/etc, which I mount into them, so as to simplify the = provisioning, setup, and future migration processes as much as possible. = If I have to modify /etc/rc.conf to get a fully functional jail, though, = then the setup becomes a bit more complex, though admittedly in a far = from insurmountable way. With that in context, my original question about out-of-the-box support = for /usr/local/etc/rc.conf came mostly out of confusion, as I can see = the pattern of supporting /etc/foo & /usr/local/etc/foo in multiple = places, e.g. pkg (as already referenced), but for rc(8) it=E2=80=99s = /etc/foo & /etc/foo.local, and I couldn=E2=80=99t understand why, = leading me to believe there was something I was either misunderstanding, = or not finding in the documentation. Hence my initiative to submit a = merge request to support /usr/local/etc/rc.conf out-of-the-box, even if = only for consistency=E2=80=99s sake. >=20 > It's quite common to have a shared /etc, but very uncommon to need = that > to be limited to what an unscripted install would put in out of the > box. If you want this because you're applying a common template to > install a lot of machines, there is a common approach of scripting the > install to add the extra variable (or more) to /etc/rc.conf; they will > be customized, but they will all be customized in the same automated > way. You just change them all to have /usr/local/etc/rc.conf (your > choice of filename) included in ${rc_conf_files}. In my current scripting I point sysrc(8) to = /usr/local/etc/rc.conf.d/$name for each service(8) customization I need. = Customizing rc_conf_files in /etc/rc.conf and then using a single = /usr/local/etc/rc.conf for all of my service(8) needs would also be a = functional alternative, for sure. >=20 > That said, I don't see any reason that /etc/defaults/rc.conf couldn't > be modified in the official build to include a file in /usr/local into > ${rc_conf_files} if said file exists. Make sure the filename isn't > likely to conflict with anything other people have already used, but > aside from that I don't see any downsides. I=E2=80=99d think /usr/local/etc/rc.conf would by very far be the = preferred choice for out-of-the-box support. When I first get a chance = I=E2=80=99ll start a bit of a more formal inquiry into that. >=20 > Be well. Regards,