Handle directives like 'Archive Device =' with no value
authorJamie Cameron <jcameron@webmin.com>
Thu, 17 Jan 2008 18:14:00 +0000 (18:14 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 17 Jan 2008 18:14:00 +0000 (18:14 +0000)
bacula-backup/bacula-backup-lib.pl

index 43cc740..b71df57 100644 (file)
@@ -143,6 +143,18 @@ if (!defined($config_file_cache{$file})) {
                                $parent = $dir;
                                }
                        }
+               elsif (/^\s*(\S[^=]*\S)\s*=\s*$/) {
+                       # A name = with no value
+                       local $rest = $3;
+                       local $dir = { 'name' => $1,
+                                      'value' => undef,
+                                      'line' => $lnum,
+                                      'eline' => $lnum,
+                                      'file' => $file,
+                                      'type' => 0,
+                                      'parent' => $parent };
+                       push(@{$parent->{'members'}}, $dir);
+                       }
                elsif (/^\s*(\S+)\s*{\s*$/) {
                        # Start of a section
                        local $dir = { 'name' => $1,