#!/bin/bash
#
# (c) Lorenzo Canovi (KUBiC Labs, CH) <packager@kubiclabs.com>
# for copyright see /usr/share/doc/kuwatcher/copyright
#
# 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'
