#! /bin/bash

# Test if given node exists in Vyatta config hierarchy
#
#  if vyatta-exists interfaces wireless

if [ -z "$VYATTA_TEMP_CONFIG_DIR" ]; then
    echo "$0: not in configuration mode" 1>&2;
    exit 1;
fi
IFS=/
node=$*
IFS=
exec test -d $VYATTA_TEMP_CONFIG_DIR/$node