mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Show nicer conversion message
This commit is contained in:
@@ -68,6 +68,7 @@ else {
|
||||
print &ui_subheading($text{'convert_msg'});
|
||||
print "<table border width=100%><tr><td bgcolor=#c0c0c0><pre>\n";
|
||||
map { $exists{$_->{'name'}}++ } &list_users();
|
||||
$skipped = $exists = $invalid = $converted = 0;
|
||||
foreach $u (@users) {
|
||||
local $ok;
|
||||
if ($in{'conv'} == 0) {
|
||||
@@ -88,13 +89,16 @@ foreach $u (@users) {
|
||||
$u->{'uid'} <= $in{'max'};
|
||||
}
|
||||
if (!$ok) {
|
||||
print &text('convert_skip', $u->{'user'}),"\n";
|
||||
#print &text('convert_skip', $u->{'user'}),"\n";
|
||||
$skipped++;
|
||||
}
|
||||
elsif ($exists{$u->{'user'}}) {
|
||||
print "<i>",&text('convert_exists', $u->{'user'}),"</i>\n";
|
||||
$exists++;
|
||||
}
|
||||
elsif ($u->{'user'} !~ /^[A-z0-9\-\_\.]+$/) {
|
||||
print "<i>",&text('convert_invalid', $u->{'user'}),"</i>\n";
|
||||
$invalid++;
|
||||
}
|
||||
else {
|
||||
# Actually add the user
|
||||
@@ -115,6 +119,7 @@ foreach $u (@users) {
|
||||
|
||||
push(@{$group->{'members'}}, $u->{'user'});
|
||||
$exists{$u->{'user'}}++;
|
||||
$converted++;
|
||||
}
|
||||
}
|
||||
endpwent() if ($gconfig{'os_type'} ne 'hpux');
|
||||
@@ -123,6 +128,9 @@ endpwent() if ($gconfig{'os_type'} ne 'hpux');
|
||||
&modify_group($group->{'name'}, $group);
|
||||
&restart_miniserv();
|
||||
|
||||
# Print summary
|
||||
print &text('convert_done', $converted, $invalid, $exists, $skipped),"<p>\n";
|
||||
|
||||
print "</pre></td></tr></table><br>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
|
||||
@@ -276,6 +276,7 @@ convert_exists=$1 already exists
|
||||
convert_invalid=$1 is not a valid Webmin username
|
||||
convert_added=$1 being added
|
||||
convert_msg=Converting Unix users...
|
||||
convert_done=$1 users converted, $2 invalid, $3 already exist, $4 excluded.
|
||||
|
||||
sync_title=Unix User Synchronization
|
||||
sync_desc=This form allows you to configure the automatic synchronization of Unix users created through Webmin and users in this module.
|
||||
|
||||
Reference in New Issue
Block a user