X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fsvc_acct_sm.import;h=b668405f5f94b6c7c7b2bdb95bb6128bd8dee5a0;hb=21b3f9beaa73e13f7d5499c4852192594d20f5fb;hp=bda9762e11899ca805c38d8f41c66a8067f706cd;hpb=93ced168cd4e1e23d36094a919576fc646b4df28;p=freeside.git diff --git a/bin/svc_acct_sm.import b/bin/svc_acct_sm.import index bda9762e1..b668405f5 100755 --- a/bin/svc_acct_sm.import +++ b/bin/svc_acct_sm.import @@ -1,35 +1,11 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.import,v 1.4 1999-03-25 08:42:20 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.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; @@ -123,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"; @@ -148,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: $_"; @@ -240,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); @@ -278,6 +257,6 @@ END # sub usage { - die "Usage:\n\n svc_acct_sm.export user\n"; + die "Usage:\n\n svc_acct_sm.import user\n"; }