blockd: remove symlink linkpath file if it's a dir or link
authorRafał Miłecki <rafal@milecki.pl>
Sat, 28 Dec 2019 21:07:22 +0000 (22:07 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 21 Mar 2020 21:41:41 +0000 (22:41 +0100)
commit830441d790d67147dc9d9bca4a9d3d4a7228e367
treee9576cd226df4c6053fbc1b1c31da084bd8cd9b8
parentd1f1f2b38fa1e7b594bd005e563679a40e4d7e95
blockd: remove symlink linkpath file if it's a dir or link

Files like that can remain from using non-autofs mounting and can cause
mounting errors after switching to autofs:
blockd: failed to symlink /mnt/sda1->/tmp/run/blockd/sda1

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
blockd.c