#!/bin/sh -e INTERFACE="$1" NEW_STATE="$2" test -n "$INTERFACE" test -n "$NEW_STATE" [ "$NEW_STATE" = "up" ] && exec ifup "$INTERFACE" [ "$NEW_STATE" = "down" ] && exec ifdown "$INTERFACE"