diff options
author | Michael Larson <mike@ft1.vyatta.com> | 2009-09-09 16:26:01 -0700 |
---|---|---|
committer | Michael Larson <mike@ft1.vyatta.com> | 2009-09-09 16:26:01 -0700 |
commit | 5f1a33134d463fa565ee9dd43237252bd27d5fb3 (patch) | |
tree | 70f1ac5b1e76a0ae875c71ca15089ecdbc45c122 /scripts/vyatta-exists | |
parent | 028e8e12c5e15efc0a316641f2b02e46d5c77210 (diff) | |
parent | 42abfac6f11077dbfc3b0eaf845597e38f7cd685 (diff) | |
download | vyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.tar.gz vyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.zip |
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg into kenwood
Diffstat (limited to 'scripts/vyatta-exists')
-rwxr-xr-x | scripts/vyatta-exists | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/vyatta-exists b/scripts/vyatta-exists new file mode 100755 index 0000000..ef2dea3 --- /dev/null +++ b/scripts/vyatta-exists @@ -0,0 +1,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 |