diff options
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; |