X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fsvc_acct_sm.import;h=723fb029fd722b4837d29494fca0791eac6461d1;hb=a03e44937be8d6c2f99dc830ef2583cbbbb36dfc;hp=50b0f67026749cda46e35e0d7946d5fdd7be986a;hpb=5bd5f206a77cf975515d955119d4dff7764a2d8c;p=freeside.git diff --git a/bin/svc_acct_sm.import b/bin/svc_acct_sm.import index 50b0f6702..723fb029f 100755 --- a/bin/svc_acct_sm.import +++ b/bin/svc_acct_sm.import @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.import,v 1.5 2000-02-03 05:16:52 ivan Exp $ +# $Id: svc_acct_sm.import,v 1.9 2001-04-22 01:56:15 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -16,7 +16,19 @@ # ivan@sisd.com 98-jul-13 # # $Log: svc_acct_sm.import,v $ -# Revision 1.5 2000-02-03 05:16:52 ivan +# Revision 1.9 2001-04-22 01:56:15 ivan +# get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN) +# +# Revision 1.8 2000/12/03 15:14:00 ivan +# bugfixes from Jeff Finucane , thanks! +# +# Revision 1.7 2000/06/29 10:51:52 ivan +# oops, silly mistake +# +# Revision 1.6 2000/06/29 10:48:25 ivan +# make svc_acct_sm skip blank lines in sendmail import +# +# Revision 1.5 2000/02/03 05:16:52 ivan # beginning of DNS and Apache support # # Revision 1.4 1999/03/25 08:42:20 ivan @@ -32,7 +44,7 @@ use strict; use vars qw(%d_part_svc %m_part_svc); use Term::Query qw(query); -use FS::SSH qw(iscp); +use Net::SCP qw(iscp); use FS::UID qw(adminsuidsetup datasrc); use FS::Record qw(qsearch qsearchs); use FS::svc_acct_sm; @@ -126,8 +138,9 @@ END sub getvalue { my $prompt = shift; $^W=0; #Term::Query isn't -w-safe - query $prompt, ''; + my $data = query $prompt, ''; $^W=1; + $data; } print "\n\n"; @@ -151,6 +164,7 @@ my(%svcnum); while () { next if /^(#|$)/; + next if $mta{$mta} eq 'sendmail' && /^\s*$/; #blank lines /^\.?([\w\-\.]+)$/ #or do { warn "Strange rcpthosts/sendmail.cw line: $_"; next; }; or die "Strange rcpthosts/sendmail.cw line: $_"; @@ -243,7 +257,8 @@ END or die "Can't open $spooldir/virtusertable.import: $!"; while () { next if /^#/; #comments? - /^([\w\-\.]+)?\@([\w\-\.]+)\t([\w\-\.]+)$/ + next if /^\s*$/; #blank lines + /^([\w\-\.]+)?\@([\w\-\.]+)\t+([\w\-\.]+)$/ #or do { warn "Strange virtusertable line: $_"; next; }; or die "Strange virtusertable line: $_"; my($domuser,$domain,$username)=($1,$2,$3);