#!/bin/bash
#
# __copy1__
# __copy2__
#
# checks if a given network card (interface) has the cable
# plugged in or not
#
# note that 'ethtool' may not work on some card types, and
# so the cable state will be FALSE
#
CMD=${CMD:-"$0"}
DEBUG=${DEBUG:-"false"}

ethtool $1 | grep -q 'Link detected: yes'
