Force create /run/sendsigs.omit.d link when starting zed

Resolve the following error when restarting the zed by force creating
the /run/sendsigs.omit.d/zed link.

sudo /etc/init.d/zfs-zed restart
 * Stopping ZFS Event Daemon            [ OK ]
 * Starting ZFS Event Daemon
 ln: failed to create symbolic link `/run/sendsigs.omit.d/zed': File exists

Signed-off-by: SenH <sen@senhaerens.be>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3747
This commit is contained in:
SenH 2015-09-08 09:45:22 -07:00 committed by Brian Behlendorf
parent 3b36f8319d
commit 1e17e910ea

View File

@ -150,7 +150,7 @@ zfs_daemon_start()
# so add the zed pid to list of pids to ignore.
if [ -f "$PIDFILE" -a -d /run/sendsigs.omit.d ]
then
ln -s "$PIDFILE" /run/sendsigs.omit.d/zed
ln -sf "$PIDFILE" /run/sendsigs.omit.d/zed
fi
elif type daemon > /dev/null 2>&1 ; then
# Fedora/RedHat functions