]> git.datanom.net - pve-dhcp-server.git/commitdiff
Allow comments in files
authorMichael Rasmussen <mir@datanom.net>
Tue, 22 Jul 2014 00:04:32 +0000 (02:04 +0200)
committerMichael Rasmussen <mir@datanom.net>
Tue, 22 Jul 2014 00:04:32 +0000 (02:04 +0200)
DHCPServer.pm

index 7c43f822e729ca5edb769fc3c0e333237e6af3d4..5b6701fca41e84a585709837b17fc5bae21dc480 100644 (file)
@@ -435,7 +435,7 @@ sub read_lease_file {
                                $self->logger("Key: $key");
                        } else {
                                next if $error;
-                               next if ($_ =~ /^\s*}\s*/ || $_ =~ /^\s*$/);
+                               next if ($_ =~ /^\s*}\s*/ || $_ =~ /^\s*$/ || $_ =~ /^\s*#.*/);
                                if ($_ =~ /^\s*(starts|ends|binding state|hardware ethernet|client-hostname)\s+(.+)\s*;/) {
                                        $lease->{$1} = $2;
                                        $self->logger("Key: $1 Value: $2");
This page took 0.031513 seconds and 5 git commands to generate.