diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-08-24 12:16:11 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-08-24 12:16:11 -0700 |
commit | 3f9fb7b08f92a55bf4e3b458316d42935a4d6501 (patch) | |
tree | 6d1c7335f4d37421a0f4b5284033137638f54421 /scripts/vyatta-exists | |
parent | be84d74f900c98004fdaa6d4fc0baa749422f7cc (diff) | |
parent | 29662246b32dd27b2540ae766684f2c634e8d044 (diff) | |
download | vyatta-cfg-3f9fb7b08f92a55bf4e3b458316d42935a4d6501.tar.gz vyatta-cfg-3f9fb7b08f92a55bf4e3b458316d42935a4d6501.zip |
Merge branch 'kenwood' of suva.vyatta.com:/git/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 |