From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E6CED73148 for ; Thu, 17 Jun 2021 15:52:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CCB011C6D7 for ; Thu, 17 Jun 2021 15:52:52 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 1EB431C5E6 for ; Thu, 17 Jun 2021 15:52:49 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id ED7274664C for ; Thu, 17 Jun 2021 15:52:48 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Thu, 17 Jun 2021 15:52:17 +0200 Message-Id: <20210617135223.23472-11-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210617135223.23472-1-s.ivanov@proxmox.com> References: <20210617135223.23472-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.734 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH zfsonlinux 10/16] Remove /etc/zfs/zed.d on purge X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2021 13:52:53 -0000 (cherry picked from debian-upstream [0] commits d0ba1164dcf8e566a5134d8fadef4c84d5afdf6c and 3ddeaa236e758e3dee7a9eedac66a001a11953c3) [0] https://salsa.debian.org/zfsonlinux-team/zfs/ Signed-off-by: Stoiko Ivanov --- debian/zfs-zed.postrm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 debian/zfs-zed.postrm diff --git a/debian/zfs-zed.postrm b/debian/zfs-zed.postrm new file mode 100644 index 00000000..e9aed3f4 --- /dev/null +++ b/debian/zfs-zed.postrm @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +zedd="/usr/lib/zfs-linux/zed.d" +etcd="/etc/zfs/zed.d" + +if [ "$1" = "purge" ] && [ -d "$etcd" ] ; then + # remove the overrides created in prerm + find "${etcd}" -maxdepth 1 -lname '/dev/null' -delete + # remove any dangling symlinks to old zedlets + find "${etcd}" -maxdepth 1 -lname "${zedd}/*" -xtype l -delete + # clean up any empty directories + ( rmdir "$etcd" && rmdir "/etc/zfs" ) || true +fi + +#DEBHELPER# + -- 2.20.1