summaryrefslogtreecommitdiff
path: root/scripts/vyatta-check-typeless-node.pl
blob: 65a740863e40b3f6784c66e57f0bf7a5966fc53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;