From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH zfsonlinux 09/16] Adjust zed.d symlink-preservation
Date: Thu, 17 Jun 2021 15:52:16 +0200 [thread overview]
Message-ID: <20210617135223.23472-10-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210617135223.23472-1-s.ivanov@proxmox.com>
Closes BTS#983401.
- Overwrite dangling symlinks on install
- Does not clobber symlinks on removal
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
(cherry picked from commit b024d59f5976ea75ac9a0b48612b7032d24513ee)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
debian/zfs-zed.postinst | 2 +-
debian/zfs-zed.prerm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/zfs-zed.postinst b/debian/zfs-zed.postinst
index 93325438..a615eec9 100644
--- a/debian/zfs-zed.postinst
+++ b/debian/zfs-zed.postinst
@@ -8,7 +8,7 @@ etcd="/etc/zfs/zed.d"
while read -r file ; do
etcfile="${etcd}/${file}"
[ -e "${etcfile}" ] && continue
- ln -s "${zedd}/${file}" "${etcfile}"
+ ln -sfT "${zedd}/${file}" "${etcfile}"
done < "${zedd}/DEFAULT-ENABLED"
# remove the overrides created in prerm
diff --git a/debian/zfs-zed.prerm b/debian/zfs-zed.prerm
index fca0f4a7..b8340df5 100644
--- a/debian/zfs-zed.prerm
+++ b/debian/zfs-zed.prerm
@@ -7,8 +7,8 @@ etcd="/etc/zfs/zed.d"
if [ "$1" != "failed-upgrade" ] && [ -d "${etcd}" ] && [ -d "${zedd}" ] ; then
while read -r file ; do
etcfile="${etcd}/${file}"
- [ -e "${etcfile}" ] && continue
- ln -s /dev/null "${etcfile}"
+ ( [ -L "${etcfile}" ] || [ -e "${etcfile}" ] ) && continue
+ ln -sT /dev/null "${etcfile}"
done < "${zedd}/DEFAULT-ENABLED"
fi
--
2.20.1
next prev parent reply other threads:[~2021-06-17 13:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 13:52 [pve-devel] [PATCH zfsonlinux 00/16] sync buildsys with debian-upstream Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 01/16] buildsys: unify '{' and '(' in Makefile Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 02/16] buildsys: add all packages to make variable and sort Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 03/16] Reflect libssl requirement of libzfs Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 04/16] Elaborate the functionality of ZED in long description. (Closes: #979414) Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 05/16] buildsys: switch to automatic debug packages Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 06/16] Bump debhelper compat level to 12 Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 07/16] compat 12 automatically adds initramfs trigger Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 08/16] Bump Standards-Version to 4.5.1 (no changes) Stoiko Ivanov
2021-06-17 13:52 ` Stoiko Ivanov [this message]
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 10/16] Remove /etc/zfs/zed.d on purge Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 11/16] sync scrub and trim cronjobs with debian upstream Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 12/16] update lintian-overrides Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 13/16] drop unused lintian overrides Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 14/16] add symbol files for library packages Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 15/16] update libzpool symbols Stoiko Ivanov
2021-06-17 13:52 ` [pve-devel] [PATCH zfsonlinux 16/16] do not restart zfs-volume-wait.service Stoiko Ivanov
2021-06-18 13:44 ` [pve-devel] applied: [PATCH zfsonlinux 00/16] sync buildsys with debian-upstream Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210617135223.23472-10-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal