Skip to content

Commit

Permalink
only create symbolic link if it doesn't already exist
Browse files Browse the repository at this point in the history
`-L` checks if it's a symbolic link
  • Loading branch information
enoch85 committed May 1, 2020
1 parent c4d1e1d commit 6e43f65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/change-to-zfs-mount-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ mkdir -p /etc/zfs/zfs-list.cache
# Enable ZFS Event Daemon(ZED) aka ZEDLET
if [ -f /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh ]
then
check_command ln -s /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh /etc/zfs/zed.d
if [ ! -L /etc/zfs/zed.d/history_event-zfs-list-cacher.sh ]
then
check_command ln -s /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh /etc/zfs/zed.d
fi
else
msg_box "/usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh is missing, aborting!"
exit 1
Expand Down

0 comments on commit 6e43f65

Please sign in to comment.