From 3f01b48af73dcf40e0e6fd3cf62242bce4863422 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 23 Nov 2005 16:13:37 +0000 Subject: create new function and use it --- perl-install/keyboard.pm | 10 ++++++++++ perl-install/standalone/keyboarddrake | 5 +---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 26263b181..9fb95da31 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -618,6 +618,16 @@ sub configure_xorg { } } +sub configure_and_set_standalone { + my ($keyboard) = @_; + + configure_xorg($keyboard); + setxkbmap($keyboard); + + &write($keyboard); + system('/etc/init.d/keytable', 'restart'); +} + sub read() { my %keyboard = getVarsFromSh("$::prefix/etc/sysconfig/keyboard") or return; if (!$keyboard{KEYBOARD}) { diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index ef1e700aa..0961094ad 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -47,11 +47,8 @@ if (my ($kb) = grep { !/^-/ } @ARGV) { } } -keyboard::setxkbmap($keyboard); -keyboard::configure_xorg($keyboard); -keyboard::write($keyboard); -system('/etc/init.d/keytable', 'restart'); +keyboard::configure_and_set_standalone($keyboard); end: $in->exit(0) if $in; -- cgit v1.2.1