From nobody Tue May 07 07:40:41 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 4VYVZ15Zhnz5KG74; Tue, 07 May 2024 07:40:41 +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 4VYVZ14Jhvz4Mfl; Tue, 7 May 2024 07:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715067641; 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=aANQyhGY+I0c1tgu5SlrzB/MVebFoYuwgDbPeX31Z1s=; b=MvFuOhPkquWjigwxGhApJ1QCWwy6Ynl3A+sXTkVDqHgE8hT/w7s+4mIuH5rjVi+wSBaQud DsLfNtG5axXbqr0rOB946W/AQ4BTJMfg3HoHcK/WvCEOaxw3C8AKfELkGTp/iG/kQhNVSb TJalqhZE73pJ2uP+VGx2vabYWxXZthXn5WikDy41LxZk4NhpBVoW7L19ASUDLlR5Rq88/i UvGzUQdB0GQnucNpU+EZ1ubkWbmLykBbpn7g/oej2L+U84vXg3VtdBdbIKoaiA9OGjubJq uJo9viH8wYqlHpV7/12BNKkvKFujSUpj/pxWlEdDJW0Uwiosk6abBEC9yQTmBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715067641; a=rsa-sha256; cv=none; b=nEcRUGRZt6ZyvNChCWhoJwtvIgLJzNrOo+3Rcb+8KClC716uR6bWOFIjQ8lw3dsIzPEbOg QheKixjeA/LudvK6flfawKGvU0XVbsqK+YanUHIdoBsVVQ+bdSyO7FtOuKFDndxYjTH/CR AIaqQ8wz1//azD6e37XxKXm0jCZ/LV3qxUKNnXPSxsX2Oqo22o0apxUvjKmDDTq4++a4Ij SW1mdQli2o5+13rDUqLmv0TYQoxP+/VnrkW2AZQwBEvxrAE93d04XxtFzQVGw+MR31jV6U atPmixHOwk3WvitX1sNSC7W0JGJAQo7iEtL5S2c18wT9y8z+uumvxJz1K0Q3Bw== 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=1715067641; 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=aANQyhGY+I0c1tgu5SlrzB/MVebFoYuwgDbPeX31Z1s=; b=WnwSc9Q6yE+t6L+WV09VZeaQxMF0hYOGolKkJzADh8VvrQD4iPas9Bf/rDYHXltjr0W4TI Ib+TJkpKPaSDJ5zrRIaUtn7ZNXNo7P0mNIzM7Pa16G34dKyjFsSrIzpRb3oO6XMtUynonZ N3KmjqXFEOneeePTOD9+qEioqMByyhIJMlMCmSzTsQb2yQHnFRBIN7MOoGcI4UuM+jw5Jo SyQ41oq9eoPs3qWuscFpilO393qRR0s3wGe7hkLESBe2mDOD/pxvRA9hmiON0dvAEBaZdR eouXsvgJX08/KtIPL+WvDN7UIWNaz+AXVam+BZffC5MQmF3pkcfmPSMrIpyq6g== 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 4VYVZ13wTWzXrq; Tue, 7 May 2024 07:40:41 +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 4477ef4S094768; Tue, 7 May 2024 07:40:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4477efNa094765; Tue, 7 May 2024 07:40:41 GMT (envelope-from git) Date: Tue, 7 May 2024 07:40:41 GMT Message-Id: <202405070740.4477efNa094765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 0c7237d7e234 - main - Remove GBDE rc support 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: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c7237d7e23482eb5fe117eba9ce86c2b08fb5d1 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7237d7e23482eb5fe117eba9ce86c2b08fb5d1 commit 0c7237d7e23482eb5fe117eba9ce86c2b08fb5d1 Author: Poul-Henning Kamp AuthorDate: 2024-05-07 07:23:03 +0000 Commit: Poul-Henning Kamp CommitDate: 2024-05-07 07:23:03 +0000 Remove GBDE rc support --- libexec/rc/rc.conf | 6 --- libexec/rc/rc.d/gbde | 119 --------------------------------------------------- 2 files changed, 125 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index c91f13bd9812..2bd8af67c602 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -86,12 +86,6 @@ zfsd_enable="NO" # Set to YES to automatically start the ZFS fault gptboot_enable="YES" # GPT boot success/failure reporting. -# Experimental - test before enabling -gbde_autoattach_all="NO" # YES automatically mounts gbde devices from fstab -gbde_devices="NO" # Devices to automatically attach (list, or AUTO) -gbde_attach_attempts="3" # Number of times to attempt attaching gbde devices -gbde_lockdir="/etc" # Where to look for gbde lockfiles - # GELI disk encryption configuration. geli_devices="" # List of devices to automatically attach in addition to # GELI devices listed in /etc/fstab. diff --git a/libexec/rc/rc.d/gbde b/libexec/rc/rc.d/gbde deleted file mode 100755 index 295972a5697b..000000000000 --- a/libexec/rc/rc.d/gbde +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -# -# This file, originally written by Garrett A. Wollman, is in the public -# domain. -# -# - -# PROVIDE: disks -# KEYWORD: nojail - -. /etc/rc.subr - -name="gbde" -desc="GEOM Based Disk Encryption" -start_precmd="find_gbde_devices start" -stop_precmd="find_gbde_devices stop" -start_cmd="gbde_start" -stop_cmd="gbde_stop" - -find_gbde_devices() -{ - case "${gbde_devices-auto}" in - [Aa][Uu][Tt][Oo]) - gbde_devices="" - ;; - *) - return 0 - ;; - esac - - case "$1" in - start) - fstab="/etc/fstab" - ;; - stop) - fstab=$(mktemp /tmp/mtab.XXXXXX) - mount -p >${fstab} - ;; - esac - - # - # We can't use "mount -p | while ..." because when a shell loop - # is the target of a pipe it executes in a subshell, and so can't - # modify variables in the script. - # - while read device mountpt type options dump pass; do - case "$device" in - *.bde) - # Ignore swap devices - case "$type" in - swap) - continue - ;; - esac - - case "$options" in - *noauto*) - if checkyesno gbde_autoattach_all; then - gbde_devices="${gbde_devices} ${device}" - fi - ;; - *) - gbde_devices="${gbde_devices} ${device}" - ;; - esac - ;; - esac - done <${fstab} - - case "$1" in - stop) - rm -f ${fstab} - ;; - esac - - return 0 -} - -gbde_start() -{ - for device in $gbde_devices; do - parent=${device%.bde} - parent=${parent#/dev/} - parent_=`ltr ${parent} '/' '_'` - eval "lock=\${gbde_lock_${parent_}-\"${gbde_lockdir}/${parent_}.lock\"}" - if [ -e "/dev/${parent}" -a ! -e "/dev/${parent}.bde" ]; then - echo "Configuring Disk Encryption for ${parent}." - - count=1 - while [ ${count} -le ${gbde_attach_attempts} ]; do - if [ -e "${lock}" ]; then - gbde attach ${parent} -l ${lock} - else - gbde attach ${parent} - fi - if [ -e "/dev/${parent}.bde" ]; then - break - fi - echo "Attach failed; attempt ${count} of ${gbde_attach_attempts}." - count=$((${count} + 1)) - done - fi - done -} - -gbde_stop() -{ - for device in $gbde_devices; do - parent=${device%.bde} - parent=${parent#/dev/} - if [ -e "/dev/${parent}.bde" ]; then - umount "/dev/${parent}.bde" 2>/dev/null - gbde detach "${parent}" - fi - done -} - -load_rc_config $name -run_rc_command "$1"