summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorivan <ivan>2003-06-12 13:57:08 +0000
committerivan <ivan>2003-06-12 13:57:08 +0000
commitf0e07588b2eef04bf5a8cbf0b77c6bde27e02321 (patch)
tree2fff0c08a654cc0f9bbd0077bc8d92765621a696 /bin
parentd7fa80b06b82168ed78e888835197e09b29491dd (diff)
better error handling for re-imports
Diffstat (limited to 'bin')
-rwxr-xr-xbin/passwd.import10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/passwd.import b/bin/passwd.import
index fbf27370f..304499e34 100755
--- a/bin/passwd.import
+++ b/bin/passwd.import
@@ -1,5 +1,5 @@
#!/usr/bin/perl -Tw
-# $Id: passwd.import,v 1.5 2002-06-21 09:57:05 ivan Exp $
+# $Id: passwd.import,v 1.6 2003-06-12 13:57:08 ivan Exp $
use strict;
use vars qw(%part_svc);
@@ -104,7 +104,13 @@ while (<PASSWD>) {
});
my($error);
$error=$svc_acct->insert;
- die $error if $error;
+ if ( $error ) {
+ if ( $error =~ /duplicate/i ) {
+ warn "$username: $error";
+ } else {
+ die "$username: $error";
+ }
+ }
}