From nobody Thu Oct 30 18:09:39 2025 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 4cyBw33zl9z6FMgQ; Thu, 30 Oct 2025 18:09:39 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cyBw33MgBz4BpJ; Thu, 30 Oct 2025 18:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761847779; 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=k5t+ytof55iGm72P/12oeU68EWC9uIVBJl6n6rUbaH8=; b=bqHYWFX2QU5qrNJNMCzRcTzqM7V8SSRIBd+rVoYNEqjLBEN22umAJd5LDlRAfjbBnIKPyu rT4w3azfLF+Bzg7Csy4l5nTl60WE6rEMbruektEX1knwQf/AdzJvV3PwIlV2UJ0GQa2Cfe ZcUXeGe7Rf2/hGgcSzBfNElPjZALrsX//u+ReSae7T3V1V2fP1RZvp+qMg7LXogPyzUfBC Kr12USgZxwfHO5aCfOXHLNFKVj9qs/RM3pmAEdPqSjzx4C4ExwD043QKuAzYpZHLZl4ZKi n6oxutXB5WAKEGRT4xgeKe/mb783J7AzCvSvMbY71cD8dbr96grbn5fKzOYOvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761847779; 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=k5t+ytof55iGm72P/12oeU68EWC9uIVBJl6n6rUbaH8=; b=UmfHgVW1zPFMRyF+u/xS5MpgzQmRoL5D3JFFu399h4KCI2JmIqwFMc3oRo2BUlS5FyuB1o 1Hzc/NvC7Cd9Xyl9Obvn+C++xT5Q9gbfsi6OPFJgZc366vm+aAnHrnysfmY/5HJImu+4eB OqnkIrPWJL0odMnr4EOwPhHrQI8GfzAgutb+JGynu8o372wZAgZJEiKyiTr1y/BDgJKaEj sVNhBDeXkKaGm9leO8ewt0pRXC3k0H+Dhlk2TqPjBGsmZ+uXNYWXb80aLcNmdL/yvDUBNV BXI/y6Q0XwrbZ0n2ImBdiFlHgAZ3CuFVRmtkD313TsHXd4KJfUlh0j/13eCewA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761847779; a=rsa-sha256; cv=none; b=HwaidezRNUuy6szHy67wVqBXM0V71qUG+oJHoV3uZYVaFQnydIDgOAA8zR5rmcjcE7MhrN cufYJvbm9c30ABwN0yqoAbJaeY+4JWEtn3rzv956jh2rR+O4opqwpz4ZbbwRbwpyz+xpNF JloLvppO/BfT/88h3wUNKeWsEv88Css36FJlDXiqpNKe3Gnorj9hBCnjDD++N80jVUlXGz QSEZ15hBCbPaFH9EPNywXH8Nt/I3gSKeRreaPMKCwI6wItl7ExLAZ0JCX+TRFcj17fdKQT tfLAMV1LDOFGz56pe5f7YEgJdbyAvAQTtDWeMIZFBWx7AWJCPuEeOynMesbi2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cyBw32sCVzZhw; Thu, 30 Oct 2025 18:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59UI9deW031876; Thu, 30 Oct 2025 18:09:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59UI9d4a031873; Thu, 30 Oct 2025 18:09:39 GMT (envelope-from git) Date: Thu, 30 Oct 2025 18:09:39 GMT Message-Id: <202510301809.59UI9d4a031873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: a797702be077 - main - rc.subr set dot_dir and dot_file in dot 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a797702be077c4671e3d437d6b9ffd37f2e86277 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a797702be077c4671e3d437d6b9ffd37f2e86277 commit a797702be077c4671e3d437d6b9ffd37f2e86277 Author: Simon J. Gerraty AuthorDate: 2025-10-30 18:09:13 +0000 Commit: Simon J. Gerraty CommitDate: 2025-10-30 18:09:13 +0000 rc.subr set dot_dir and dot_file in dot Files read by '.' cannot workout for themselves where they are or what they are called, so set dot_dir and dot_file to pass this information to them. Reviewed by: obrien, stevek Differential Revision: https://reviews.freebsd.org/D53476 --- libexec/rc/rc.subr | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 8317ff5c0922..e4ad14f582d6 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -121,11 +121,22 @@ dotted= dot() { local f verify + local dot_dir dot_file o_verify_set off verify for f in "$@"; do if [ -f $f -a -s $f ]; then dotted="$dotted $f" + case $f in + */*) + dot_dir=${f%/*} + dot_file=${f##*/} + ;; + *) + dot_dir=. + dot_file=$f + ;; + esac . $f fi done @@ -152,8 +163,7 @@ vdot() for f in "$@"; do [ -f $f -a -s $f ] || continue if is_verified $f 2> /dev/null; then - dotted="$dotted $f" - . $f + dot $f else rc=80 # EAUTH fi