--- mogadm,old 2007-11-06 10:08:46.000000000 -0800 +++ mogadm 2007-11-06 10:08:51.000000000 -0800 @@ -245,6 +245,17 @@ # load up our config files my %opts; + +Getopt::Long::Configure("require_order", "pass_through"); +GetOptions( + "trackers=s" => \$opts{trackers}, + "config=s" => \$opts{config}, + "lib=s" => \$opts{lib}, + "help" => \$opts{help}, + "verbose" => \$opts{verbose}, + ) or abortWithUsage(); +Getopt::Long::Configure("require_order", "no_pass_through"); + my @configs = ($opts{config}, "$ENV{HOME}/.mogilefs.conf", "/etc/mogilefs/mogilefs.conf"); foreach my $fn (reverse @configs) { next unless $fn && -e $fn; @@ -253,21 +264,11 @@ while () { s/\#.*//; next unless m!^\s*(\w+)\s*=\s*(.+?)\s*$!; - $opts{$1} = $2; + $opts{$1} = $2 unless ( defined $opts{$1} ); } close FILE; } -Getopt::Long::Configure("require_order", "pass_through"); -GetOptions( - "trackers=s" => \$opts{trackers}, - "config=s" => \$opts{config}, - "lib=s" => \$opts{lib}, - "help" => \$opts{help}, - "verbose" => \$opts{verbose}, - ) or abortWithUsage(); -Getopt::Long::Configure("require_order", "no_pass_through"); - # bail for help abortWithUsage() if $opts{help};