]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/hooks/ports/ip-tunnel
hotplug: Remove multiple copies of the same function
[people/stevee/network.git] / src / hooks / ports / ip-tunnel
index fa7193ca1566b92513032e6d05e94d5a5e05dfe0..482511ea2c1147196a67ea3e8c0478f336ca4719 100644 (file)
@@ -146,26 +146,5 @@ hook_remove() {
 }
 
 hook_hotplug_rename() {
-       local port="${1}"
-       assert isset port
-
-       local device="${2}"
-       assert isset device
-
-       local ${HOOK_SETTINGS[*]}
-       if ! port_settings_read "${port}"; then
-               log ERROR "Could not read settings for port ${port}"
-               return ${EXIT_ERROR}
-       fi
-
-       # Get the current MAC address of the device.
-       local address="$(device_get_address ${device})"
-       assert isset address
-
-       # Return OK on match
-       if [ "${ADDRESS}" = "${address}" ]; then
-               return ${EXIT_OK}
-       fi
-
-       return ${EXIT_ERROR}
+       hook_hotplug_rename_by_address "$@"
 }