X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fsvc_acct.import;h=795b853c0f4c808f489f54bd772cd1afd620460e;hp=c2ef4fd7f5a04177743ef2fc819530ba2fb0f90b;hb=e5d8fd10937c98ef6bfe06ee745cba36d33a9dc5;hpb=7a503c0ec805aa1a428ee094660f8146efee4653 diff --git a/bin/svc_acct.import b/bin/svc_acct.import index c2ef4fd7f..795b853c0 100755 --- a/bin/svc_acct.import +++ b/bin/svc_acct.import @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.import,v 1.9 2000-06-28 12:03:53 ivan Exp $ +# $Id: svc_acct.import,v 1.11 2000-06-29 12:27:01 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -17,8 +17,11 @@ # don't import /var/spool/freeside/conf/shells! ivan@sisd.com 98-aug-13 # # $Log: svc_acct.import,v $ -# Revision 1.9 2000-06-28 12:03:53 ivan -# make svc_acct more forgiving about RADIUS users files +# Revision 1.11 2000-06-29 12:27:01 ivan +# s/password/_password/ for PostgreSQL wasn't done in the import. +# +# Revision 1.10 2000/06/28 12:32:30 ivan +# allow RADIUS lines with "Auth-Type = Local" too # # Revision 1.8 2000/02/03 05:16:52 ivan # beginning of DNS and Apache support @@ -151,10 +154,10 @@ while () { next if /^\s*$/; next if /^\s*#/; if ( /^\S/ ) { - /^(\w+)\s+Password\s+=\s+"([^"]+)"(,\s+Expiration\s+=\s+"([^"]*")\s*)?$/ + /^(\w+)\s+(Auth-Type\s+=\s+Local,\s+)Password\s+=\s+"([^"]+)"(,\s+Expiration\s+=\s+"([^"]*")\s*)?$/ or die "1Unexpected line in users.import: $_"; my($password,$expiration); - ($username,$password,$expiration)=(lc($1),$2,$4); + ($username,$password,$expiration)=(lc($1),$3,$5); $password = '' if $password eq 'UNIX'; $upassword{$username}=$password; undef %param; @@ -219,15 +222,15 @@ while () { } my($svc_acct) = new FS::svc_acct ({ - 'svcpart' => $svcpart, - 'username' => $username, - 'password' => $password, - 'uid' => $uid, - 'gid' => $gid, - 'finger' => $finger, - 'dir' => $dir, - 'shell' => $shell, - 'slipip' => $ip{$username}, + 'svcpart' => $svcpart, + 'username' => $username, + '_password' => $password, + 'uid' => $uid, + 'gid' => $gid, + 'finger' => $finger, + 'dir' => $dir, + 'shell' => $shell, + 'slipip' => $ip{$username}, %{$allparam{$username}}, }); my($error); @@ -253,10 +256,10 @@ foreach $username ( keys %upassword ) { } my($svc_acct) = new FS::svc_acct ({ - 'svcpart' => $svcpart, - 'username' => $username, - 'password' => $password, - 'slipip' => $ip{$username}, + 'svcpart' => $svcpart, + 'username' => $username, + '_password' => $password, + 'slipip' => $ip{$username}, %{$allparam{$username}}, }); my($error);