diff options
author | ivan <ivan> | 2002-07-03 10:48:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-07-03 10:48:05 +0000 |
commit | e9af247503b619f0c61a3ba14481bc76752bdd8b (patch) | |
tree | 0f63b7df433f1941ee6236d111c71a23de6b21ca /FS | |
parent | 0da4c69a66e13410b0eff18966e13170d1306f22 (diff) |
debug
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/InitHandler.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/InitHandler.pm b/FS/FS/InitHandler.pm index 9a2154aa1..73697300e 100644 --- a/FS/FS/InitHandler.pm +++ b/FS/FS/InitHandler.pm @@ -1,9 +1,12 @@ package FS::InitHandler; use strict; +use vars qw($DEBUG); use FS::UID qw(adminsuidsetup); use FS::Record; +$DEBUG = 1; + sub handler { =pod @@ -59,12 +62,18 @@ sub handler { =cut + warn "[FS::InitHandler] handler called\n" if $DEBUG; + open(MAPSECRETS,"<$FS::UID::conf_dir/mapsecrets") or die "can't read $FS::UID::conf_dir/mapsecrets: $!"; + my %seen; while (<MAPSECRETS>) { - /^([\w\-\.]+)\s/ or do { warn "strange line in mapsecrets: $_"; next; }; - my $user = $1; + /^([\w\-\.]+)\s(.*)$/ + or do { warn "strange line in mapsecrets: $_"; next; }; + my($user, $datasrc) = ($1, $2); + next if $seen{$datasrc}++; + warn "[FS::InitHandler] preloading $datasrc for $user\n" if $DEBUG; adminsuidsetup($user); } |