Changeset 1136
- Timestamp:
- 01/03/08 09:22:31 (11 months ago)
- Files:
-
- trunk/utils/Changes (modified) (1 diff)
- trunk/utils/mogadm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/utils/Changes
r1134 r1136 1 * Make mogadm prefer command line settings over configuration file 2 settings (Derek Boonstra) 3 1 4 * Wire up fsck_reset's startpos argument. (Robin H. Johnson). 2 5 trunk/utils/mogadm
r1134 r1136 247 247 # load up our config files 248 248 my %opts; 249 my @configs = ($opts{config}, "$ENV{HOME}/.mogilefs.conf", "/etc/mogilefs/mogilefs.conf");250 foreach my $fn (reverse @configs) {251 next unless $fn && -e $fn;252 open FILE, "<$fn"253 or die "unable to open $fn: $!\n";254 while (<FILE>) {255 s/\#.*//;256 next unless m!^\s*(\w+)\s*=\s*(.+?)\s*$!;257 $opts{$1} = $2;258 }259 close FILE;260 }261 249 262 250 Getopt::Long::Configure("require_order", "pass_through"); … … 269 257 ) or abortWithUsage(); 270 258 Getopt::Long::Configure("require_order", "no_pass_through"); 259 260 my @configs = ($opts{config}, "$ENV{HOME}/.mogilefs.conf", "/etc/mogilefs/mogilefs.conf"); 261 foreach my $fn (reverse @configs) { 262 next unless $fn && -e $fn; 263 open FILE, "<$fn" 264 or die "unable to open $fn: $!\n"; 265 while (<FILE>) { 266 s/\#.*//; 267 next unless m!^\s*(\w+)\s*=\s*(.+?)\s*$!; 268 $opts{$1} = $2 unless ( defined $opts{$1} ); 269 } 270 close FILE; 271 } 271 272 272 273 # bail for help
