From 76eff7e703a5449fa6bd9cda7fb1bf13b18513b8 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Sun, 25 Apr 2021 22:21:09 +0200 Subject: [PATCH] Debian: Handle preexisting zed symlink In the latest test (on 10.9 w/ ZFS 2.0.3), the file already existed. --- install-zfs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install-zfs.sh b/install-zfs.sh index e4b8c72..4068124 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -1352,7 +1352,10 @@ function fix_filesystem_mount_ordering { chroot_execute "mkdir /etc/zfs/zfs-list.cache" chroot_execute "touch /etc/zfs/zfs-list.cache/$c_bpool_name /etc/zfs/zfs-list.cache/$v_rpool_name" - chroot_execute "ln -s /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh /etc/zfs/zed.d/" + + # On Debian, this file may exist already. + # + chroot_execute "[[ ! -f /etc/zfs/zed.d/history_event-zfs-list-cacher.sh ]] && ln -s /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh /etc/zfs/zed.d/" # Assumed to be present by the zedlet above on Debian, but missing. # Filed issue: https://github.com/zfsonlinux/zfs/issues/9945.