diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-12-06 14:06:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-12-06 14:06:44 +0000 |
commit | 6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647 (patch) | |
tree | 4385bb4c7773351483f5320780a62b94875bfe65 /perl-install | |
parent | 3e550d30825fe99118dd7c94c54a94ee06012e16 (diff) | |
download | drakx-backup-do-not-use-6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647.tar drakx-backup-do-not-use-6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647.tar.gz drakx-backup-do-not-use-6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647.tar.bz2 drakx-backup-do-not-use-6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647.tar.xz drakx-backup-do-not-use-6f09486fa6b42c0b3fedb48d4b8dd2e6ac52c647.zip |
add possibility to use keyboarddrake non-interactive (aka give the keyboard as
first parameter)
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index b12a3f152..33c1862a1 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -11,19 +11,23 @@ use c; local $_ = join '', @ARGV; -/-h/ and die _("usage: keyboarddrake [--expert]\n"); +/-h/ and die _("usage: keyboarddrake [--expert] [keyboard]\n"); $::expert = /-expert/; $::isStandalone = 1; +my ($keyboard) = grep { !/^-/ } @ARGV; + my $in = interactive->vnew('su'); -my $keyboard = $in->ask_from_listf_(_("Keyboard"), +$keyboard ||= $in->ask_from_listf_(_("Keyboard"), _("Please, choose your keyboard layout."), \&keyboard::keyboard2text, [ keyboard::xmodmaps() ], keyboard::read()); +keyboard::keyboard2text($keyboard) or die "bad keyboard $keyboard\n"; + my $isNotDelete = $::expert && !$in->ask_yesorno("BackSpace", _("Do you want the BackSpace to return Delete in console?"), 1); my $kmap = keyboard::keyboard2kmap($keyboard); |