diff --git a/debian/zfs-zed.postinst b/debian/zfs-zed.postinst index 9332543..a615eec 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 fca0f4a..b8340df 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