X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fsvc_acct.import;h=691798b0991237f6b9dfef1dfd3472b48e293a7e;hp=6541a9fd4b2f258259f419b84f6af55270813458;hb=88e029c6fab66a6596153b0f3d1f86e110f149ed;hpb=eb815cc14f3fea0a8d68b22b2fbf282eae09a92a diff --git a/bin/svc_acct.import b/bin/svc_acct.import index 6541a9fd4..691798b09 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.7 1999-07-08 02:32:26 ivan Exp $ +# $Id: svc_acct.import,v 1.10 2000-06-28 12:32:30 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -17,7 +17,13 @@ # don't import /var/spool/freeside/conf/shells! ivan@sisd.com 98-aug-13 # # $Log: svc_acct.import,v $ -# Revision 1.7 1999-07-08 02:32:26 ivan +# 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 +# +# Revision 1.7 1999/07/08 02:32:26 ivan # import fix, noticed by Ben Leibig and Joel Griffiths # # Revision 1.6 1999/07/08 01:49:00 ivan @@ -142,12 +148,13 @@ my(%upassword,%ip,%allparam); my(%param,$username); while () { chop; - next if /^$/; + 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; @@ -263,6 +270,6 @@ foreach $username ( keys %upassword ) { # sub usage { - die "Usage:\n\n svc_acct.export user\n"; + die "Usage:\n\n svc_acct.import user\n"; }