summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-15 17:05:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-15 17:05:18 +0000
commit582cc9a731459f6069e218f750eaa414ff587baf (patch)
tree8e6745e7054e084b04414804a56e78de98228562 /perl-install/standalone
parentfe791a2b227213568a101d9aae4b78f606a27dcd (diff)
downloaddrakx-582cc9a731459f6069e218f750eaa414ff587baf.tar
drakx-582cc9a731459f6069e218f750eaa414ff587baf.tar.gz
drakx-582cc9a731459f6069e218f750eaa414ff587baf.tar.bz2
drakx-582cc9a731459f6069e218f750eaa414ff587baf.tar.xz
drakx-582cc9a731459f6069e218f750eaa414ff587baf.zip
fix XkbOptions handling
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/diskdrake16
-rwxr-xr-xperl-install/standalone/keyboarddrake12
2 files changed, 11 insertions, 17 deletions
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 01c0ed294..d97c333e1 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -22,7 +22,7 @@
# DiskDrake is also based upon the libfdisk and the install from Red Hat Software
-use lib qw(/usr/lib/libDrakX);
+use lib qw(. /usr/lib/libDrakX);
use common;
use diskdrake;
use standalone;
@@ -51,14 +51,8 @@ if ($>) {
}
-#if ($ARGV[0] eq '-l') {
-# $@ and print "Error\n";
-# $::expert = 1;
-# print diskdrake::get_info($_, $hds->[0]) foreach fsedit::get_fstab($hds->[0]);
-# exit !$@;
-#}
-my $in = interactive_gtk->new;
-my ($hds, $lvms) =
+my $in = 'interactive'->vnew; #TODO('su');
+my ($all_hds) =
catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) }
sub {
my ($err) = $@ =~ /(.*) at /;
@@ -69,10 +63,10 @@ I'll try to go on blanking bad partitions"), $err]);
};
$SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") };
-my $fstab = [ fsedit::get_fstab(@$hds, @$lvms) ];
+my $fstab = [ fsedit::get_all_fstab($all_hds) ];
fs::get_mntpoints_from_fstab($fstab);
fs::check_mounted($fstab);
-diskdrake::main($hds, $lvms, {}, $in);
+$in->diskdrake::main($all_hds);
$in->exit(0);
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake
index 59118baae..a6c415c7e 100755
--- a/perl-install/standalone/keyboarddrake
+++ b/perl-install/standalone/keyboarddrake
@@ -36,10 +36,10 @@ if ($keyboard) {
my $isNotDelete = $::expert && !$in->ask_yesorno("BackSpace", _("Do you want the BackSpace to return Delete in console?"), 1);
my $kmap = keyboard::keyboard2kmap($keyboard);
- `loadkeys $kmap`;
+ system('loadkeys', $kmap);
my $xkb = keyboard::keyboard2xkb($keyboard);
- `setxkbmap $xkb`;
+ system('setxkbmap', $xkb);
my $f = "/etc/X11/XF86Config";
my $g = "/etc/X11/XF86Config-4";
@@ -47,16 +47,16 @@ if ($keyboard) {
substInFile {
if (/^Section\s+"Keyboard"/ .. /^EndSection/) {
s|^(\s*XkbLayout\s+).*|$1"$xkb"|
- and $_ .= join '', map { " $_\n" } @{$xkb_options{$xkb} || []};
- s,^(\s*(XkbVariant|XkbOptions)\s+).*,,; # remove existing one
+ and $_ .= join '', map { " $_\n" } @{$Xconfigurator::xkb_options{$xkb} || []};
+ $_ = '' if m,^(\s*(XkbVariant|XkbOptions)\s+),; # remove existing one
}
} $f if -e $f && !$::testing;
substInFile {
if (/Identifier\s+"Keyboard1"/ .. /^EndSection/) {
s|^(\s*Option\s+"XkbLayout"\s+).*|$1"$xkb"|
- and $_ .= join '', map { /(\S+)(.*)/; qq( Option "$1" $2\n) } @{$xkb_options{$xkb} || []};
- s,^(\s*Option\s+"(XkbVariant|XkbOptions)"\s+).*,,; # remove existing one
+ and $_ .= join '', map { /(\S+)(.*)/; qq( Option "$1" $2\n) } @{$Xconfigurator::xkb_options{$xkb} || []};
+ $_ = '' if m,^(\s*Option\s+"(XkbVariant|XkbOptions)"\s+),; # remove existing one
}
} $g if -e $g && !$::testing;