From nobody Fri Apr 19 16:57:38 2024 X-Original-To: dev-commits-src-all@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 4VLgmy364vz5HNZF; Fri, 19 Apr 2024 16:57:38 +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 4VLgmy2PQGz4f8n; Fri, 19 Apr 2024 16:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713545858; 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=flf0fd1j2zWJOE64YkJ88clxMTr6MRa+vb35h9metYg=; b=f4nfGj0XUNEmuTE/3MpXs0NpDBLc7GPw2h5AeIXJrlqEXMH6WzgNWugm6Qt59qFE+6XIoU KHTJplrAf5Mh1ah9Dv7gMY0+uB6fJuSNOslOrl0SiklGxDFYJBSSmTH+ZJYjtlF2k656Ep KG9bFTIE8zDrTKjnBN+4f+v3jdpQfFczpEeaxqpeKoAjkY1zFIfbCbFMM8ACysFVgKHREp V+ECWuja0BFDD/T8lhWqYC7gBhOzu0ihAqAT5uBkIqIws9dbRFRTHr7ndR0u2j4TZ6hF/7 RhYM8pRgQCN3z36kjxg9z1NEbfxkAjB8h6RYuL+8+U0PugD59ehhpDrUeU7eFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713545858; a=rsa-sha256; cv=none; b=t+7VnlXt8k535EchHIhDcsnYDmQ7iY9XNn16TtVG63ie7l/fpe9VfenZ/qJTHmAwV7Khq1 B442ViH1anqbKimPxV4JTrzqbi5tmsjWgIPWs34uh1jMWMiwJmvZGuyyO83n3FZHjA7VB8 XJBmAqdViKr8tzc5vZLUH5w1UaStLjGQmpZeqFj2mLZriQDIn2Y4Vo/0PeUYQJrha+/cAo Ccuu3lpNwc0uOYTwyLp3LyqCdFlxoI6aSUJWvMLSehKQvN+3xq6nAlyRKHWXkC+tCH4wmj tCbD0XpUbCAvFIj4+6RVPRH9KIR836CUmbbOZHOvksGzkM2awKMkxTya08m47w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713545858; 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=flf0fd1j2zWJOE64YkJ88clxMTr6MRa+vb35h9metYg=; b=lo0EMA/H4cfIeueuvBCq+uxcOJhf0tXrLeuFIDaC/JLMWXFkCHyjMZ4GtFwDl11AuLeDde +IAuXDE7ZI28cTy1JFqKZG9XUqmLp6H9Zxj6bWPct4gSN0DbBoiXD2HNCK6i3/ekVYJDZB Ex5lWmCaTFG809UTn8UMGHSH+LNA7R6anUIMUxzkUVCUlpAwO0PbGBLxBctATYL9wsRzru /5Y8wpfd0dd5IS+uT+3f+387TH2pKuSfBy4XJX6mWRVlNaEKUxXBlXNmJFDZAyBvSfAcH/ TKpO0tmh1ijlBrjhVZ96VrjJjDU1GojHy8GBV/MTDc3S4T3bXfwDWNCAf3ObAg== 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 4VLgmy20J0z11GY; Fri, 19 Apr 2024 16:57:38 +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 43JGvcSD017413; Fri, 19 Apr 2024 16:57:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43JGvcSf017410; Fri, 19 Apr 2024 16:57:38 GMT (envelope-from git) Date: Fri, 19 Apr 2024 16:57:38 GMT Message-Id: <202404191657.43JGvcSf017410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: d3b6d70e0dfa - main - freebsd-update(8): Use kern.module_path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3b6d70e0dfaa4e9496bddcbc212d7d3ea392800 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/src/commit/?id=d3b6d70e0dfaa4e9496bddcbc212d7d3ea392800 commit d3b6d70e0dfaa4e9496bddcbc212d7d3ea392800 Author: Fernando ApesteguĂ­a AuthorDate: 2024-04-15 12:18:06 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2024-04-19 16:57:11 +0000 freebsd-update(8): Use kern.module_path Instead of tailored configuration files to look for module_path entries. Reported by: kevans@ Reviewed by: kevans, imp, zlei Approved by: kevans,zlei Differential Revision: https://reviews.freebsd.org/D44797 --- usr.sbin/freebsd-update/freebsd-update.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index d1cd46963a6c..9f5eaebfd64a 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -673,17 +673,13 @@ upgrade_check_kmod_ports() { fi # Most modules are in /boot/modules but we should actually look - # in every path configured in module_path - search_files="/boot/defaults/loader.conf /boot/loader.conf" - pattern=$(grep -shE '^module_path=' ${search_files} | - tail -1 | - cut -f2 -d\" | - tr ";" "|") + # in every module_path passed to the kernel: + pattern=$(sysctl -n kern.module_path | tr ";" "|") if [ -z "${pattern}" ]; then - # Not having module_path in loader.conf is probably an error. - # Check at least the most common path - pattern="/boot/modules" + echo "Empty kern.module_path sysctl. This should not happen." + echo "Aborting check of kernel modules installed from ports." + return fi # Check the pkg database for modules installed in those directories