fi
}
+function device_is_ethernet_compatible() {
+ local device="${1}"
+
+ # /sys/class/net/*/type must equal 1 for ethernet compatible devices
+ local type="$(__device_get_file "${device}" "type")"
+ [[ "${type}" = "1" ]]
+}
+
function device_get_status() {
local device=${1}
assert isset device
cli_print_fmt1 1 "Status" "${status}"
cli_print_fmt1 1 "Type" "${type}"
+
+ # Ethernet-compatible?
+ device_is_ethernet_compatible "${device}" &>/dev/null
+ cli_print_fmt1 1 "Ethernet-compatible" "$(cli_print_bool $?)"
+
cli_print_fmt1 1 "Address" "$(device_get_address ${device})"
cli_space