Re: "amgetconfig --list" missing support for new subsection types
Jean-Louis Martineau <[email protected]> Mon, 13 Nov 2017 08:13:38 -0500
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
Natthan, I committed the attached patch to fix the issue. Jean-Louis On 13/11/17 12:32 AM, Nathan Stratton Treadway wrote: > (Amanda 3.5:) > > I noticed that amgetconf allows me to access properties of a defined > taperscan, storage, policy, or interactivity: > > ===== > # amgetconf TestBackup taperscan:taper_lexical:comment > lexical > amgetconf TestBackup storage:TestBackup:labelstr > "^TESTBACKUP-[0-9][0-9]*$" > # amgetconf TestBackup policy:TestBackup:comment > implicit from global config > # amgetconf TestBackup interactivity:inter_tty:plugin > tty > ===== > > ... but support for these types is missing from the --list option: > > ===== > # amgetconf TestBackup --help |tail -10 > > With --list, PARAM can be one of > changer > interface > script > holdingdisk > application > device > dumptype > tapetype > > # amgetconf TestBackup --list application > app_amgtar > app_amstar > app_amsamba > > # amgetconf TestBackup --list taperscan > amgetconf: no such parameter "taperscan" > # amgetconf TestBackup --list storage > amgetconf: no such parameter "storage" > # amgetconf TestBackup --list policy > amgetconf: no such parameter "policy" > # amgetconf TestBackup --list interactivity > amgetconf: no such parameter "interactivity" > ===== > > > Nathan > > > ---------------------------------------------------------------------------- > Nathan Stratton Treadway - [email protected] - Mid-Atlantic region > Ray Ontko & Co. - Software consulting services - http://www.ontko.com/ > <http://www.ontko.com/> > GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt > <http://www.ontko.com/~nathanst/gpg_key.txt> > ID: 1023D/ECFB6239 > Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239 This message is the property of CARBONITE, INC. and may contain confidential or privileged information. If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail
amgetconf-list.diff
(text/x-patch, 1.3 KB)
diff --git a/common-src/amgetconf.pl b/common-src/amgetconf.pl
index f4305d3..715c68f 100644
--- a/common-src/amgetconf.pl
+++ b/common-src/amgetconf.pl
@@ -61,7 +61,7 @@ values in subsections are specified in the form TYPE:NAME:PARAMETER.
With --list, PARAM can be one of
EOF
- for my $name (keys %Amanda::Config::subsection_names) {
+ for my $name (sort keys %Amanda::Config::subsection_names) {
print " $name\n"
if $Amanda::Config::subsection_names{$name};
}
diff --git a/perl/Amanda/Config.swg b/perl/Amanda/Config.swg
index 963dba27..ed5d8dd 100644
--- a/perl/Amanda/Config.swg
+++ b/perl/Amanda/Config.swg
@@ -1682,16 +1682,20 @@ amglue_export_tag(getconf,
# only those keys with a value of '1' should be shown; the
# others are deprecated
our %subsection_names = (
- "tapetype" => 1,
+ "application" => 1,
+ "application-tool" => 0,
+ "changer" => 1,
+ "device" => 1,
"dumptype" => 1,
- "interface" => 1,
"holdingdisk" => 1,
- "application" => 1,
+ "interactivity" => 1,
+ "interface" => 1,
+ "policy" => 1,
"script" => 1,
- "application-tool" => 0,
"script-tool" => 0,
- "device" => 1,
- "changer" => 1,
+ "storage" => 1,
+ "tapetype" => 1,
+ "taperscan" => 1,
);
%}
amglue_export_tag(getconf, %subsection_names);