summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfigurator.pm63
-rw-r--r--perl-install/Xconfigurator_consts.pm9
-rw-r--r--perl-install/any.pm17
-rw-r--r--perl-install/install2.pm6
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_steps.pm11
-rw-r--r--perl-install/install_steps_gtk.pm1
-rw-r--r--perl-install/install_steps_interactive.pm13
-rw-r--r--perl-install/keyboard.pm2
-rw-r--r--perl-install/mouse.pm6
-rwxr-xr-xperl-install/standalone/adduserdrake4
11 files changed, 94 insertions, 40 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 5ec9400eb..bd9cc7934 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -153,9 +153,9 @@ sub keepOnlyLegalModes {
sub cardConfigurationAuto() {
my $card;
- if (my ($c) = pci_probing::main::probe("DISPLAY")) {
+ if (my (@c) = pci_probing::main::probe("DISPLAY")) {
local $_;
- ($card->{identifier}, $_) = @$c;
+ ($card->{identifier}, $_) = @{$c[-1]};
$card->{type} = $1 if /Card:(.*)/;
$card->{server} = $1 if /Server:(.*)/;
$card->{flags}{needVideoRam} &&= /86c368/;
@@ -696,6 +696,48 @@ EndSection
) if $o->{wacom};
+ print G qq(
+Section "InputDevice"
+ Identifier "stylus"
+ Driver "wacom"
+ Option "Type" "stylus"
+ Option "Device" "/dev/$o->{wacom}"
+EndSection
+Section "InputDevice"
+ Identifier "eraser"
+ Driver "wacom"
+ Option "Type" "eraser"
+ Option "Device" "/dev/$o->{wacom}"
+EndSection
+Section "InputDevice"
+ Identifier "cursor"
+ Driver "wacom"
+ Option "Type" "cursor"
+ Option "Device" "/dev/$o->{wacom}"
+EndSection
+) if $o->{wacom};
+
+ print G qq(
+Section "Module"
+
+# This loads the DBE extension module.
+
+ Load "dbe"
+
+# This loads the miscellaneous extensions module, and disables
+# initialisation of the XFree86-DGA extension within that module.
+
+ SubSection "extmod"
+ Option "omit xfree86-dga"
+ EndSubSection
+
+# This loads the Type1 and FreeType font modules
+
+ Load "type1"
+ Load "freetype"
+EndSection
+);
+
#- Write monitor section.
$O = $o->{monitor};
print F $monitorsection_text1;
@@ -831,7 +873,22 @@ Section "Screen"
#- bpp 32 not handled by XF4
$subscreen->(*G, "svga", min($O->{default_depth}, 24), $O->{depth});
- print G $layoutsection_v4;
+ print G '
+
+Section "ServerLayout"
+ Identifier "layout1"
+ Screen "screen1"
+ InputDevice "Mouse1" "CorePointer"
+';
+ print G '
+ InputDevice "stylus" "AlwaysCore"
+ InputDevice "eraser" "AlwaysCore"
+ InputDevice "cursor" "AlwaysCore"
+' if $o->{wacom};
+ print G '
+ InputDevice "Keyboard1" "CoreKeyboard"
+EndSection
+';
close F;
close G;
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index 086b9f85b..d294cad45 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -756,12 +756,3 @@ $screensection_text1 = '
# **********************************************************************
';
-$layoutsection_v4 = '
-
-Section "ServerLayout"
- Identifier "layout1"
- Screen "screen1"
- InputDevice "Mouse1" "CorePointer"
- InputDevice "Keyboard1" "CoreKeyboard"
-EndSection
-';
diff --git a/perl-install/any.pm b/perl-install/any.pm
index ae3d187f7..0eb1000c4 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -16,7 +16,7 @@ use run_program;
#-PO: names (tie, curly...) have corresponding icons for kdm
my @users_male = (__("tie"), __("default"), __("curly")); #- don't change the names, files correspond to them
my @users_female = (__("brunette"), __("girl"), __("woman-blond"));
-@users = (@users_male, @users_female);
+@users = (@users_male, @users_female, __("automagic"));
sub addKdmIcon {
my ($prefix, $user, $icon, $force) = @_;
@@ -25,29 +25,30 @@ sub addKdmIcon {
eval { commands::cp("$prefix/usr/share/icons/user-$icon-mdk.xpm", $dest) } if $icon;
}
-sub addKdmUsers {
+sub allocUsers {
my ($prefix, @users) = @_;
require timezone;
my @u1 = @users_male;
my @u2 = @users_female;
- foreach (@users) {
- my $l = rand() < timezone::sexProb($_) ? \@u2 : \@u1;
- my $u = splice(@$l, rand(@$l), 1); #- known biased (see cookbook for better)
- addKdmIcon($prefix, $_, $u);
- eval { commands::cp "$prefix/usr/share/icons/user-$u-mdk.xpm", "$prefix/usr/share/apps/kdm/pics/users/$_.xpm" };
+ foreach (grep { !$_->{icon} || $_->{icon} eq "automagic" } @users) {
+ my $l = rand() < timezone::sexProb($_->{name}) ? \@u2 : \@u1;
+ $_->{auto_icon} = splice(@$l, rand(@$l), 1); #- known biased (see cookbook for better)
@u1 = @users_male unless @u1;
@u2 = @users_female unless @u2;
}
- addKdmIcon($prefix, 'root', 'hat', 'force');
}
sub addUsers {
my ($prefix, @users) = @_;
my $msec = "$prefix/etc/security/msec";
+
+ allocUsers($prefix, @users);
foreach my $u (@users) {
substInFile { s/^$u\n//; $_ .= "$u\n" if eof } "$msec/user.conf" if -d $msec;
+ addKdmIcon($prefix, $u->{name}, delete $u->{auto_icon} || $u->{icon}, 'force');
}
run_program::rooted($prefix, "/usr/share/msec/grpuser.sh --refresh");
+ addKdmIcon($prefix, 'root', 'hat', 'force');
}
sub setupBootloader {
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 6b52ded91..60b0ca166 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -600,12 +600,6 @@ sub main {
$o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt";
mkdir $o->{prefix}, 0755;
-#- #- needed very early to switch bad cards in VGA16
-#- foreach (pci_probing::main::probe('')) {
-#- log::l("Here: $_->[0]");
-#- $_->[0] =~ /i740|ViRGE/ and add2hash_($o, { vga16 => 1 }), log::l("switching to VGA16 as bad graphic card");
-#- }
-
#- needed very early for install_steps_gtk
eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 943118a72..fe6689659 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -241,6 +241,8 @@ sub setPackages($) {
my @l = ();
push @l, "kapm" if $o->{pcmcia};
+ require timezone;
+ push @l, "isdn4k-utils" if ($o->{timezone}{timezone} || timezone::bestTimezone(lang::lang2text($o->{lang}))) =~ /Europe/;
$_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { $o->{packages}{$_} } @l;
pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6d13edf22..fc60af16e 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -553,6 +553,7 @@ sub addUser($) {
$_->{uid} = $u; $uids{$u} = 1;
$_->{gid} = $g; $gids{$g} = 1;
$_->{pw} ||= $_->{password} && install_any::crypt($_->{password});
+ $_->{shell} ||= "/bin/bash";
$done{$_->{name}} = 1;
}
} @{$o->{users} || []};
@@ -577,7 +578,6 @@ sub addUser($) {
}
eval { commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}") }
if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg};
- any::addKdmIcon($p, $u->{name}, $u->{icon});
}
require any;
any::addUsers($o->{prefix}, map { $_->{name} } @l);
@@ -654,6 +654,11 @@ sub setupBootloaderBefore {
} else {
require lilo;
lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion($o));
+ if ($o->{miscellaneous}{profiles}) {
+ my $e = lilo::get_label("linux", $o->{bootloader});
+ push @{$o->{bootloader}{entries}}, { %$e, label => "office", append => "$e->{append} prof=Office" };
+ $e->{append} .= " prof=Home";
+ }
lilo::suggest_floppy($o->{bootloader}) if $o->{security} <= 3;
$o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard});
}
@@ -699,8 +704,6 @@ sub setupXfreeBefore {
require Xconfig;
Xconfig::getinfoFromDDC($o->{X});
- $::xf4 = 1;
-
#- keep this here if the package has to be updated.
install_any::pkg_install($o, "XFree86");
}
@@ -746,7 +749,7 @@ sub miscellaneous {
my %s = getVarsFromSh("$o->{prefix}/etc/sysconfig/system");
$o->{miscellaneous}{HDPARM} ||= $s{HDPARM} if exists $s{HDPARM};
- $o->{miscellaneous}{CLEAN_TMP} ||= $s{HDPARM} if exists $s{CLEAN_TMP};
+ $o->{miscellaneous}{CLEAN_TMP} ||= $s{CLEAN_TMP} if exists $s{CLEAN_TMP};
$o->{security} ||= $s{SECURITY} if exists $s{SECURITY};
$ENV{SECURE_LEVEL} = $o->{security};
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index a96f9b151..5af96574b 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -439,6 +439,7 @@ sub choosePackagesTree {
my ($leaf, $root) = @_;
my $node = $tree->insert_node($parent->($root), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0);
my $p = $packages->[0]{$leaf} or return;
+ $p->{medium}{selected} or return;
my $pix = pkgs::packageFlagBase($p) ? $pix_base : pkgs::packageFlagSelected($p) ? $pix_selected : $pix_unselect;
$tree->node_set_pixmap($node, 1, $pix->[0], $pix->[1]);
push @{$ptree{$leaf}}, $node;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index d089797c1..746f4ac66 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -651,10 +651,13 @@ _("Use NIS") => { val => \$o->{authentication}{NIS}, type => 'bool', text => _("
#------------------------------------------------------------------------------
sub addUser {
my ($o, $clicked) = @_;
- my $u = $o->{user} ||= $o->{security} < 1 ? { name => "mandrake", password => "mandrake", realname => "default" } : {};
+ my $u = $o->{user} ||= {};
+ if ($::beginner || $o->{security} < 1) {
+ add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default" });
+ $o->{users} ||= [ $u ];
+ }
$u->{password2} ||= $u->{password} ||= "";
$u->{shell} ||= "/bin/bash";
- $u->{icon} ||= translate('default');
my @fields = qw(realname name password password2);
my @shells = install_any::shells($o);
@@ -929,9 +932,11 @@ _("Removable media automounting") => { val => \$o->{useSupermount}, type => 'boo
$::expert ? (
_("Clean /tmp at each boot") => { val => \$u->{CLEAN_TMP}, type => 'bool' },
) : (),
- $u->{numlock} ? (
+ $o->{pcmcia} ? (
+_("Enable multi profiles") => { val => \$u->{profiles}, type => 'bool' },
+ ) : (
_("Enable num lock at startup") => { val => \$u->{numlock}, type => 'bool' },
- ) : (),
+ ),
], complete => sub {
!$u->{memsize} || $u->{memsize} =~ s/^(\d+)M?$/$1M/i or $o->ask_warn('', _("Give the ram size in Mb")), return 1;
my %m = reverse %l; $ENV{SECURE_LEVEL} = $o->{security} = $m{$s};
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 5e905aa2c..5b0a09de9 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -124,7 +124,7 @@ arch() =~ /^ppc/ ? (
"ge_la"=>[__("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la"],
"gr" => [ __("Greek"), "gr-8859_7", "gr" ],
"hu" => [ __("Hungarian"), "hu-latin2", "hu" ],
- "hr" => [ __("Croatian"), "croat", "si" ],
+ "hr" => [ __("Croatian"), "croat", "yu" ],
"il" => [ __("Israeli"), "il-8859_8", "il" ],
"il_phonetic" => [ __("Israeli (Phonetic)"),"hebrew", "il_phonetic" ],
"is" => [ __("Icelandic"), "is-latin1", "is" ],
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 20509559c..a16c0b1d7 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -136,19 +136,19 @@ sub detect() {
my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
require pci_probing::main;
- if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
+ if (my ($c) = grep { $_->[1] =~ /usb-/ } pci_probing::main::probe('')) {
eval {
modules::load($c->[1], "SERIAL_USB");
modules::load("usbmouse");
modules::load("mousedev");
};
sleep(1);
- do {
+ if (!$@ && detect_devices::tryOpen("usbmouse")) {
$wacom or modules::unload("serial");
modules::load("usbkbd");
modules::load("keybdev");
return name2mouse("USB Mouse"), $wacom;
- } if !$@ && detect_devices::tryOpen("usbmouse");
+ }
modules::unload("mousedev");
modules::unload("usbmouse");
modules::unload($c->[1], 'remove_alias');
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 1d2eeb9c5..843d6821b 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -31,7 +31,7 @@ my $in = vnew interactive('su');
my @users;
new:
-$u = { icon => translate('default') };
+$u = { icon => translate('automagic') };
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)) : ''),
@@ -77,7 +77,7 @@ sub addusers {
}
system("adduser $_") foreach @u;
- any::addUsers('', @u);
+ any::addUsers('', @_);
substInFile {
foreach my $u (@users) {