summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-29 23:50:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-29 23:50:14 +0000
commit4d37bebbb47db98088c70d4d4395ca29cef35f8a (patch)
tree996d38b7735fa03a79be75615dbe6692916d0094 /perl-install/standalone
parent6de7bc2092b2c1c7c3bae2b4a7d0c8b59ce5e1d3 (diff)
downloaddrakx-backup-do-not-use-4d37bebbb47db98088c70d4d4395ca29cef35f8a.tar
drakx-backup-do-not-use-4d37bebbb47db98088c70d4d4395ca29cef35f8a.tar.gz
drakx-backup-do-not-use-4d37bebbb47db98088c70d4d4395ca29cef35f8a.tar.bz2
drakx-backup-do-not-use-4d37bebbb47db98088c70d4d4395ca29cef35f8a.tar.xz
drakx-backup-do-not-use-4d37bebbb47db98088c70d4d4395ca29cef35f8a.zip
no_comment
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/adduserdrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 87384e06b..7ead7679b 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-use lib qw(/usr/lib/libDrakX);
+use lib qw(.); #/usr/lib/libDrakX);
use common qw(:common :functional :system :file);
use interactive;
@@ -28,8 +28,10 @@ if (my @l = grep { ! /^-/ } @ARGV) {
}
my $in = vnew interactive('su');
+my @users;
new:
+$u = { icon => translate('default') };
if ($in->ask_from_entries_refH(
[ _("Add user"), _("Accept user"), _("Done") ],
_("Enter a user\n%s", $users ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @users)) : ''),
@@ -41,6 +43,8 @@ if ($in->ask_from_entries_refH(
_("Password (again)") => {val => \$u->{password2}, hidden => 1},
), $::beginner ? () : (
_("Shell") => {val => \$u->{shell}, list => \@shells, not_edit => !$::expert}
+ ), $security > 3 ? () : (
+ _("Icon") => {val => \$u->{icon}, list => [ map { translate($_) } @any::users ], not_edit => 1 },
),
],
focus_out => sub {
@@ -54,11 +58,11 @@ if ($in->ask_from_entries_refH(
$u->{name} or $o->ask_warn('', _("Please give a user name")), return (1,0);
$u->{name} =~ /^[a-z0-9_-]+$/ or $o->ask_warn('', _("The user name must contain only lower cased letters, numbers, `-' and `_'")), return (1,0);
member($u->{name}, map { $_->{name} } @users) and $o->ask_warn('', _("This user name is already added")), return (1,0);
+ $u->{icon} = untranslate($u->{icon}, @any::users);
return 0;
},
)) {
push @users, $u;
- $u = {};
goto new;
}