delete also if 99-default.link is a symbolic link

Closes https://github.com/openmediavault/openmediavault/issues/682 and https://github.com/openmediavault/openmediavault/issues/683

In Raspbian Buster 2020-02-13, the file is a symbolic link to /dev/null and is not detected correctly with the -f condition
This commit is contained in:
Santiago Reig 2020-04-29 19:36:52 +02:00 committed by GitHub
parent bdbdff042b
commit de92eca149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,7 +385,7 @@ fi
# remove networkmanager and dhcpcd5 then configure networkd
if [ ${version} -gt 4 ]; then
defLink="/etc/systemd/network/99-default.link"
if [ -f "${defLink}" ]; then
if [ -f "${defLink}" || -L "${defLink}" ]; then
rm -f "${defLink}"
fi
nic="eth0"