diff options
author | Robert Bays <rbays@moresby.vyatta.com> | 2008-03-14 13:38:07 -0700 |
---|---|---|
committer | Robert Bays <rbays@moresby.vyatta.com> | 2008-03-14 13:38:07 -0700 |
commit | b5864fdc4462d1f329ebe852754c7877846d8bfa (patch) | |
tree | a5ba7e1876dc2489402ba37546d700c44b218915 | |
parent | 0b2a533b973b3d92f1292470cd07338d9cf157ed (diff) | |
download | vyatta-cfg-b5864fdc4462d1f329ebe852754c7877846d8bfa.tar.gz vyatta-cfg-b5864fdc4462d1f329ebe852754c7877846d8bfa.zip |
fix for bugs 2725 2999
-rw-r--r-- | scripts/vyatta-check-typeless-node.pl | 21 |
1 files changed, 21 insertions, 0 deletions
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; |