All pastes #34400 Raw Edit

Untitled

public text v1 · immutable
#34400 ·published 2005-12-20 23:14 UTC
rendered paste body
if [ -z "$1" -o -z "$2" ]; then
        echo "Insufficient parameters" > /dev/stderr
        exit 1
fi

INTERFACE="$1"
ACTION="$2"

case ${ACTION} in
        CONNECTED)
                ngc -u net/${INTERFACE}
                ;;
        DISCONNECTED)
                ngc -d net/${INTERFACE}
                ;;
        *)
                echo "Unknown action ${ACTION}" > /dev/stderr
                exit 1
                ;;
esac