| Newsgroups |
gmane.comp.isp.ispman.cvs |
| Message-ID |
<[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv11952
Modified Files:
ispman.listVars
Log Message:
working with ispmanVarSort
Index: ispman.listVars
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.listVars,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ispman.listVars 10 May 2002 12:55:41 -0000 1.3
+++ ispman.listVars 13 Jan 2004 22:35:17 -0000 1.4
@@ -7,14 +7,52 @@
use lib qw(%%installDir%%/lib);
use ISPMan;
my $ispman=ISPMan->new();
-my $modules=$ispman->getConfVars($ARGV[0]);
+
+my $modules;
+my $module;
my ($var,$val);
-for (sort keys %$modules){
- $var="$modules->{$_}{'ispmanModule'}/$modules->{$_}{'ispmanVar'}";
- $var="$modules->{$_}{'ispmanVar'}";
- $val="$modules->{$_}{'ispmanVal'}";
- write();
-}
+
+if ($ARGV[0]){
+ push @$modules, $ARGV[0];
+} else {
+ my $all_modules=$ispman->getConfModules();
+ for (keys %$all_modules){
+ push @$modules, $all_modules->{$_}{'ispmanModule'};
+ }
+}
+
+
+for $module(@$modules){
+ print "Module: $module\n\n";
+ my $vars=$ispman->getConfVars($module);
+ my @ispmanVars;
+ my $varDN;
+
+
+ if ($ispman->{'Config'}{'ispmanVarSort'}{$module}){
+ my $varSort=$ispman->{'Config'}{'ispmanVarSort'}{$module};
+ for (@$varSort){
+ # print "$_\n";
+ $varDN=$ispman->getConfVarDN($module, $_);
+ $varDN=~s/ //g;
+
+ # print "VarDN: ", $varDN, "\n";
+ # print "VarVal: ", $vars->{$varDN}{'ispmanVal'}, "\n";
+ $var=$_;
+ $val=$vars->{$varDN}{'ispmanVal'};
+ write();
+ }
+ }
+
+}
+
+
+
+
+
+
+
+
format STDOUT =
@@ -37,46 +75,6 @@
ispman.listVars allows you see various settings which are stored in ldap
-=head1 Examples
-
-To see A records for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t A >
-
-To see NS records for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t NS>
-
-To see MX records for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t MX>
-
-To see CNAME aliases for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t CNAME >
-
-To see SOA record for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t SOA >
-
-To see all records for domain ispman.org
-
-B<ispman.dnsshow -d ispman.org -t any >
-
-
-To see all NS records for all domains
-
-B<ispman.dnsshow -d all -t NS >
-
-To see all MX records for all domains
-
-B<ispman.dnsshow -d all -t MX >
-
-
-To see all all records for all domains (I dont know why though)
-
-B<ispman.dnsshow -d all -t any >
-
=head1 Author
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html