summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-08-24 12:16:11 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-08-24 12:16:11 -0700
commit3f9fb7b08f92a55bf4e3b458316d42935a4d6501 (patch)
tree6d1c7335f4d37421a0f4b5284033137638f54421
parentbe84d74f900c98004fdaa6d4fc0baa749422f7cc (diff)
parent29662246b32dd27b2540ae766684f2c634e8d044 (diff)
downloadvyatta-cfg-3f9fb7b08f92a55bf4e3b458316d42935a4d6501.tar.gz
vyatta-cfg-3f9fb7b08f92a55bf4e3b458316d42935a4d6501.zip
Merge branch 'kenwood' of suva.vyatta.com:/git/vyatta-cfg into kenwood
-rw-r--r--Makefile.am1
-rwxr-xr-xscripts/vyatta-exists14
2 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index f7096af..217de7e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -56,6 +56,7 @@ sbin_SCRIPTS += scripts/vyatta-cfg-notify
sbin_SCRIPTS += scripts/vyatta-interfaces.pl
sbin_SCRIPTS += scripts/vyatta-irqaffin
sbin_SCRIPTS += scripts/vyatta-check-typeless-node.pl
+sbin_SCRIPTS += scripts/vyatta-exists
share_perl5_DATA = lib/Vyatta/Config.pm
share_perl5_DATA += lib/Vyatta/Misc.pm
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