diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-09-28 23:46:37 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-09-28 23:46:37 (GMT) |
commit | 97c41e8f8472e02c379a495065a4432abd941971 (patch) | |
tree | 648fae623f8d07ee199bb28431d4fa3612616c43 /utils/rd-user | |
parent | bcd58fdfc6d8496d5fa250aa8d6e0d0d3a89d49d (diff) |
added rd-show
fixed debian package
Diffstat (limited to 'utils/rd-user')
-rwxr-xr-x | utils/rd-user | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/rd-user b/utils/rd-user index 5b9d479..6b191be 100755 --- a/utils/rd-user +++ b/utils/rd-user @@ -44,14 +44,14 @@ my ($dbh, undef, $errorstring) = RHRD::rddb::opendb(); if(defined $dbh) { if($cmd eq "check") { (my $result, my $status, $errorstring) = RHRD::rddb::check_user($dbh, $username); - print "$result, $status: $errorstring\n"; + print STDERR "$result, $status: $errorstring\n"; RHRD::rddb::closedb($dbh); exit $result; } elsif($cmd eq "add") { my $token = mkpasswd(-length => 16, -minnum => 3, -minupper => 3, -minspecial => 0); (my $cnt, undef, $errorstring) = RHRD::rddb::add_user($dbh, $username, $token, $fullname); unless(defined $cnt) { - print "$errorstring\n"; + print STDERR "$errorstring\n"; RHRD::rddb::closedb($dbh); exit 1; } @@ -59,7 +59,7 @@ if(defined $dbh) { } elsif($cmd eq "remove") { my @results = RHRD::rddb::remove_user($dbh, $username); if(!defined $results[0] && defined $results[2]) { - print "$results[2]\n"; + print STDERR "$results[2]\n"; } else { for my $href (@results) { print int($href->{cnt}) . " " . $href->{name} . " deleted\n"; |