Commits

Cameron Simpson committed 9890650

carp-state: report the state of a CARP interface

Comments (0)

Files changed (1)

+#!/bin/sh
+#
+# Report the state of a CARP interface.
+#       - Cameron Simpson <cs@zip.com.au> 30dec2012
+#
+
+[ $# = 1 ] || { echo "Usage: $0 carpN" >&2; exit 2; }
+
+ifconfig "$1" | sed -n 's/^	carp: \([A-Z][A-Z]*\).*/\1/p'