#!/usr/bin/perl -Tw
-# $Id: passwd.import,v 1.5 2002-06-21 09:57:05 ivan Exp $
use strict;
use vars qw(%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;
my($username,$password)=split(/:/);
#$password =~ s/^\!$/\*/;
#$password =~ s/\!+/\*SUSPENDED\* /;
+ $password =~ s/^NP$/\*/;
+ $password =~ s/^\*LK\*$/\*/;
$password{$username}=$password;
}
});
my($error);
$error=$svc_acct->insert;
- die $error if $error;
+ if ( $error ) {
+ if ( $error =~ /duplicate/i ) {
+ warn "$username: $error";
+ } else {
+ die "$username: $error";
+ }
+ }
}