This is not in use any more and sort of replaced by
device_is_ethernet_compatible().
function hook_discover() {
local device=${1}
- if [ "$(device_get_type ${device})" != "real" ]; then
+ # This obviously only works on ethernet (or compatible) devices
+ if ! device_is_ethernet_compatible "${device}"; then
exit ${EXIT_ERROR}
fi
local device=${1}
shift
- local device_type=$(device_get_type ${device})
- if [ "${device_type}" != "real" ]; then
+ # This can only be executed for ethernet (or compatible) devices
+ if ! device_is_ethernet_compatible "${device}"; then
return ${EXIT_OK}
fi
log DEBUG "Interface '${INTERFACE}' is of type '${type}'."
case "${type}" in
- ethernet|real)
+ ethernet)
# Search within all the port configurations
# if this port has already been configured.
for port in $(ports_get_all); do