summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2014-08-30 15:10:55 +0200
committerKim Hagen <khagen@multi-development.com>2014-08-30 15:10:55 +0200
commitc5ec8ee839ebc4dee621ba4e82bbba8e0c2a3e29 (patch)
treedd02fd7ba998518eccca3c6e44fd71cca9ed5487
parentb59eefd56dfadc527a5a99c37b85529fd5d61396 (diff)
downloadvyos-nhrp-c5ec8ee839ebc4dee621ba4e82bbba8e0c2a3e29.tar.gz
vyos-nhrp-c5ec8ee839ebc4dee621ba4e82bbba8e0c2a3e29.zip
Add error chenking for conf files
-rw-r--r--scripts/vyos-update-nhrp.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl
index 62b2b34..066b457 100644
--- a/scripts/vyos-update-nhrp.pl
+++ b/scripts/vyos-update-nhrp.pl
@@ -86,7 +86,7 @@ sub configure_nhrp_tunnels {
my @nhrp_tunnels = $config_nhrp_tun->listNodes();
my $notun = 0;
- open (my $fh,">$conffile");
+ open (my $fh,">$conffile") or die("Can't open $conffile: $!\n");
print $fh "";
close $fh;
@@ -135,7 +135,7 @@ sub configure_nhrp_ipsec {
my @ipsec_profiles = $config_ipsec->listNodes();
my $isipsec = 0;
- open(my $fh,">$ipsecfile");
+ open(my $fh,">$ipsecfile") or die("Can't open $ipsecfile: $!\n");
print $fh "";
close $fh;