X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fsvc_acct_sm.import;h=b668405f5f94b6c7c7b2bdb95bb6128bd8dee5a0;hb=8c1f9804d9a02c0c054eededeb500c72a640249a;hp=50b0f67026749cda46e35e0d7946d5fdd7be986a;hpb=5bd5f206a77cf975515d955119d4dff7764a2d8c;p=freeside.git diff --git a/bin/svc_acct_sm.import b/bin/svc_acct_sm.import index 50b0f6702..b668405f5 100755 --- a/bin/svc_acct_sm.import +++ b/bin/svc_acct_sm.import @@ -1,38 +1,11 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.import,v 1.5 2000-02-03 05:16:52 ivan Exp $ -# -# ivan@sisd.com 98-mar-9 -# -# generalized svcparts ivan@sisd.com 98-mar-23 - -# You really need to enable ssh into a shell machine as this needs to rename -# .qmail-extension files. -# -# now an interactive script ivan@sisd.com 98-jun-30 -# -# has an (untested) section for sendmail, s/warn/die/g and generates a program -# to run on your mail machine _later_ instead of ssh'ing for each user -# ivan@sisd.com 98-jul-13 -# -# $Log: svc_acct_sm.import,v $ -# 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 -# import stuff uses Term::Query and spits out (some kinds of) nonsensical input -# -# Revision 1.3 1999/03/24 00:51:55 ivan -# die if no relevant services... cvspain -# -# Revision 1.2 1998/12/10 07:23:18 ivan -# use FS::Conf, need user (for datasrc) -# +# $Id: svc_acct_sm.import,v 1.10 2001-08-21 02:43:18 ivan Exp $ 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 +99,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 +125,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 +218,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);