X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fpasswd.import;h=093f8bafd1a97d6a050960062f2b66f1d4a185a6;hp=d8fc013442c7401b3f90f878c3b39b2e4223cf98;hb=bfb3a80bc91a835513e437b242de366f190e9021;hpb=4b5b2b8c46413b294d96e52469016eddb016a750 diff --git a/bin/passwd.import b/bin/passwd.import index d8fc01344..093f8bafd 100755 --- a/bin/passwd.import +++ b/bin/passwd.import @@ -1,5 +1,5 @@ #!/usr/bin/perl -Tw -# $Id: passwd.import,v 1.4 2002-06-21 09:15:59 ivan Exp $ +# $Id: passwd.import,v 1.8 2003-06-12 14:08:00 ivan Exp $ use strict; use vars qw(%part_svc); @@ -14,7 +14,7 @@ use FS::part_svc; my $user = shift or die &usage; adminsuidsetup $user; -push @FS::svc_acct::shells, qw(/bin/sync /sbin/shuddown /bin/halt); #others? +push @FS::svc_acct::shells, qw(/bin/sync /sbin/shutdown /bin/halt /sbin/halt); #others? my($spooldir)="/usr/local/etc/freeside/export.". datasrc; @@ -86,10 +86,10 @@ while () { my $svcpart = $shell_svcpart; - if ( qsearchs('svc_acct', { 'username' => $username } ) ) { - warn "warning: $username already exists; skipping\n"; - next; - } + #if ( qsearchs('svc_acct', { 'username' => $username } ) ) { + # warn "warning: $username already exists; skipping\n"; + # next; + #} my($svc_acct) = new FS::svc_acct ({ 'svcpart' => $svcpart, @@ -104,7 +104,13 @@ while () { }); my($error); $error=$svc_acct->insert; - die $error if $error; + if ( $error ) { + if ( $error =~ /duplicate/i ) { + warn "$username: $error"; + } else { + die "$username: $error"; + } + } }