diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-18 10:21:58 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-18 10:21:58 -0700 |
commit | c8357d357fdd7e489fd25e76b73839e1b26fdbfa (patch) | |
tree | b35147fb2539b2be1c11a6f068907c6a6a21b754 /scripts | |
parent | a5b5ad6f5074dd165d777b2a310d609f111e1d9f (diff) | |
parent | 1b22d8e098abf1f2cf4f479dab158c7a93805d11 (diff) | |
download | vyatta-cfg-c8357d357fdd7e489fd25e76b73839e1b26fdbfa.tar.gz vyatta-cfg-c8357d357fdd7e489fd25e76b73839e1b26fdbfa.zip |
Merge branch 'glendale' of suva.vyatta.com:/git/vyatta-cfg into glendale
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-cfg-cmd-wrapper | 2 | ||||
-rw-r--r-- | scripts/vyatta-check-typeless-node.pl | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper index a1a573e..518147d 100755 --- a/scripts/vyatta-cfg-cmd-wrapper +++ b/scripts/vyatta-cfg-cmd-wrapper @@ -32,7 +32,7 @@ export VYATTA_EDIT_LEVEL=/; export VYATTA_TEMPLATE_LEVEL=/; export VYATTA_ACTIVE_CONFIGURATION_DIR=/opt/vyatta/config/active; -export VYATTA_CHANGES_ONLY_DIR=/opt/vyatta/config/tmp/changes_only_$PPID; +export VYATTA_CHANGES_ONLY_DIR=/tmp/changes_only_$PPID; export VYATTA_TEMP_CONFIG_DIR=/opt/vyatta/config/tmp/new_config_$PPID; export VYATTA_CONFIG_TMP=/opt/vyatta/config/tmp/tmp_$PPID; diff --git a/scripts/vyatta-check-typeless-node.pl b/scripts/vyatta-check-typeless-node.pl new file mode 100644 index 0000000..65a7408 --- /dev/null +++ b/scripts/vyatta-check-typeless-node.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +use lib "/opt/vyatta/share/perl5/"; +use VyattaConfig; +use VyattaMisc; +use Getopt::Long; + +## Check if a typeless node exists +# this is a lame little script to get around bug 2525 not being fixed. +# i.e. $VAR(./node/) always expands to true. Once bug 2525 is properly +# fixed, this can go away +my $node = shift; +my $config = new VyattaConfig; + +if ($config->exists("$node")) { + exit 0; +} +else { + exit 1; +} + +exit 0; |