summaryrefslogtreecommitdiff
path: root/scripts/vyatta-exists
blob: ef2dea3a475bcbc614d3feefc1377c734c04540f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /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