summaryrefslogtreecommitdiff
path: root/scripts/vyatta-ipsec-dhcp.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyatta-ipsec-dhcp.pl')
-rwxr-xr-xscripts/vyatta-ipsec-dhcp.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/vyatta-ipsec-dhcp.pl b/scripts/vyatta-ipsec-dhcp.pl
index 45ce4fc..6b8782c 100755
--- a/scripts/vyatta-ipsec-dhcp.pl
+++ b/scripts/vyatta-ipsec-dhcp.pl
@@ -93,6 +93,7 @@ open my $output_secrets, '>', $secrets_file
foreach my $line (@lines){
if (($line =~ /(.*)\#dhcp-interface=(.*)\#/) && ($2 eq $iface)){
my $secretline = $1;
+ $nip = "#" if ($nip eq '');
$secretline =~ /(.*?) (.*?) : PSK (.*)/;
$line = "$nip $2 : PSK $3\#dhcp-interface=$iface\#\n";
}