X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FInstallcheck%2FConfig.pm;fp=installcheck%2FInstallcheck%2FConfig.pm;h=835bcf934f6372d543ef9a6919b97f56c4533e29;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=2fc3918677f6996d0d2171a67c2ea133142b15ce;hpb=011a59f5a54864108a16af570a6b287410597cc2;p=debian%2Famanda diff --git a/installcheck/Installcheck/Config.pm b/installcheck/Installcheck/Config.pm index 2fc3918..835bcf9 100644 --- a/installcheck/Installcheck/Config.pm +++ b/installcheck/Installcheck/Config.pm @@ -203,6 +203,8 @@ sub remove_param { =item C =item C =item C +=item C +=item C Add the given subsection to the configuration file, including all values in the arrayref. The values should be specified as alternating key/value pairs. @@ -278,6 +280,18 @@ sub add_changer { $self->_add_subsec("changers", $name, 1, $values); } +sub add_interactivity { + my $self = shift; + my ($name, $values) = @_; + $self->_add_subsec("interactivities", $name, 1, $values); +} + +sub add_taperscan { + my $self = shift; + my ($name, $values) = @_; + $self->_add_subsec("taperscans", $name, 1, $values); +} + =item C Add arbitrary text to the config file. @@ -371,9 +385,14 @@ sub _write_amanda_conf { # write key/value pairs my @params = @{$self->{'params'}}; my $saw_tapetype = 0; + my $taperscan; while (@params) { $param = shift @params; $value = shift @params; + if ($param eq 'taperscan') { + $taperscan = $value; + next; + } print $amanda_conf "$param $value\n"; $saw_tapetype = 1 if ($param eq "tapetype"); } @@ -392,7 +411,10 @@ sub _write_amanda_conf { $self->_write_amanda_conf_subsection($amanda_conf, "holdingdisk", $self->{"holdingdisks"}); $self->_write_amanda_conf_subsection($amanda_conf, "device", $self->{"devices"}); $self->_write_amanda_conf_subsection($amanda_conf, "changer", $self->{"changers"}); + $self->_write_amanda_conf_subsection($amanda_conf, "interactivity", $self->{"interactivities"}); + $self->_write_amanda_conf_subsection($amanda_conf, "taperscan", $self->{"taperscans"}); print $amanda_conf "\n", $self->{'text'}, "\n"; + print $amanda_conf "taperscan $taperscan\n" if $taperscan; close($amanda_conf); }