summaryrefslogtreecommitdiffstats
path: root/perl-install/modules
Commit message (Expand)AuthorAgeFilesLines
* re-sync after the big svn lossPascal Rigaux2007-04-253-52/+15
* (config_window) properly report no configurable parameter (#17579)Thierry Vignaud2005-10-061-4/+4
* (read_raw) explain (ie add comments)Thierry Vignaud2005-10-031-0/+2
* (remove_module) better written this wayThierry Vignaud2005-09-071-3/+5
* (remove_module) prevent wiping /etc/modprobe.preload if module isThierry Vignaud2005-09-071-0/+1
* - move functions using /proc/partitions out of fsedit to fs::proc_partitionsPascal Rigaux2005-06-101-2/+2
* don't need prefixing with current packagePascal Rigaux2005-06-091-2/+2
* read in existing modprobe.conf on upgrade (bugzilla #13309)Pascal Rigaux2005-06-021-1/+9
* (load_category__prompt_for_more) enable one to load ide drivers if neededThierry Vignaud2005-03-251-1/+1
* (remove_module) handle removal of cards (#7049)Thierry Vignaud2005-02-141-0/+4
* (load_category__prompt_for_more)Thierry Vignaud2005-01-201-1/+1
* move SATA in its own categoryThierry Vignaud2005-01-201-1/+1
* a somewhat nicer message when loading a modulePascal Rigaux2005-01-031-6/+17
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-131-1/+1
* ensure that explanations go into /var/log/explanations is standalone modeThierry Vignaud2004-11-251-7/+7
* (load_category__prompt) fix spacing in module listThierry Vignaud2004-09-151-1/+2
* when installing on kernel 2.4, do generate a valid modprobe.conf anywayPascal Rigaux2004-09-072-2/+11
* really parse modules file according to its type when reading it (always call ...Olivier Blin2004-08-243-13/+19
* perl_checker compliancePascal Rigaux2004-08-102-2/+2
* internally keep module names according to what we configure (and our kernel, ...Pascal Rigaux2004-08-103-18/+48
* perl_checker enhancementPascal Rigaux2004-07-221-1/+1
* add $IdPascal Rigaux2004-07-223-3/+3
* modules::modprobe_conf now works (at least a little :)Pascal Rigaux2004-07-223-91/+223
* - %modules::conf is no more a global, so many functions need passing $modules...Pascal Rigaux2004-07-214-16/+281
* modules::mergein_conf() doesn't need to be given /etc/modules.confPascal Rigaux2004-07-071-1/+1
* (load_category__prompt_for_more) do not list probed category in detected hard...Thierry Vignaud2004-02-231-1/+1
* (load_category__prompt_for_more) show quotes around detected hardware in orderThierry Vignaud2004-02-231-1/+1
* don't have a wait_message above another empty wait_message when probing hardwarePascal Rigaux2004-02-131-1/+1
* (config_window) do not even try to hint the user about the parameterThierry Vignaud2004-02-031-1/+2
* (parameters) fix modinfo parsing (format had been altered betweenThierry Vignaud2004-02-031-1/+5
* help perl_checkerPascal Rigaux2004-01-221-0/+1
* kernel 2.6 .ko adaptationPascal Rigaux2004-01-201-2/+1
* write_conf() doesn't need $prefix anymorePascal Rigaux2004-01-051-1/+1
* minor cleanupThierry Vignaud2003-10-171-1/+1
* if some module has no parameter, instead of not displaying the configThierry Vignaud2003-09-111-1/+5
* translate one more stringThierry Vignaud2003-09-111-1/+1
* do translate choices N_("Yes"), N_("No"), N_("See hardware info")Pascal Rigaux2003-08-191-1/+1
* full pci probe does not freeze anymore, removing code work-arounding the freezePascal Rigaux2003-08-191-1/+0
* fix BUG 2530, no more spurious window when insmoding failDamien Chaumette2003-05-201-1/+2
* new perl_checker compliancePascal Rigaux2003-04-171-4/+4
* join detect_devices::stringlist() to have it in a text box (eurk!)Pascal Rigaux2003-02-251-1/+1
* - set_help is deprecatedPascal Rigaux2003-02-131-1/+4
* use run_program::get_stdoutPascal Rigaux2003-02-031-3/+1
* pixelize(tm)Thierry Vignaud2003-02-031-3/+1
* (load_category__prompt_for_more): cleanup, propose "See hardware info" in any...Pascal Rigaux2003-01-231-3/+2
* English proofreading by Stew BenedictsPablo Saratxaga2003-01-211-2/+2
* move any::load_category() to network::interactive::load_category()Pascal Rigaux2002-12-291-0/+117
* bug fixThierry Vignaud2002-12-051-1/+1
* rename modparm as modules::parametersThierry Vignaud2002-11-182-2/+63
* replace "_" with "N" and "__" with "N_"Pascal Rigaux2002-11-061-1/+1
="hl ipl">$_") foreach qw(cups profile.d sysconfig devfs/conf.d); #- directories we badly need as non-links because files will be written in handle_etcfiles('DIR'); #- for /etc/sysconfig/networking/ifcfg-lo mkdir "/etc/sysconfig/networking"; #- ro things symlinkf_short("/image/etc/$_", "/etc/$_") foreach qw(alternatives man.config services shells pam.d security inputrc ld.so.conf DIR_COLORS bashrc profile rc.d init.d devfsd.conf gtk-2.0 pango fonts modules.devfs dynamic hotplug gnome-vfs-2.0 gnome-vfs-mime-magic gtk gconf menu menu-methods nsswitch.conf default login.defs skel ld.so.cache openoffice xinetd.d xinetd.conf syslog.conf sysctl.conf sysconfig/networking/ifcfg-lo ifplugd); symlinkf_short("/image/etc/X11/$_", "/etc/X11/$_") foreach qw(encodings.dir app-defaults applnk fs lbxproxy proxymngr rstart wmsession.d xinit.d xinit xkb xserver xsm); #- non-trivial files/directories that need be readable, files that will be overwritten handle_etcfiles('READ', 'OVERWRITE'); #- create remaining /etc and /var subdirectories if not already copied or symlinked, #- because programs most often won't try to create the missing subdir before trying #- to write a file, leading to obscure unexpected failures -d $_ or mkdir_p $_ foreach chomp_(cat_('/image/move/directories-to-create')); #- remaining non existent /etc files are symlinked from the RO volume, #- better to have them RO than non existent. #- PB: problems arise when programs try to open then in O_WRONLY #- or O_RDWR -> in that case, they should be handled in the #- OVERWRITE section of data/etcfiles) foreach (chomp_(cat_('/image/move/all-etcfiles'))) { -f or symlinkf_short("/image/$_", $_); } #- free up stage1 memory fs::umount($_) foreach qw(/stage1/proc /stage1); #- devfsd needed for devices accessed by old names fs::mount("none", "/dev", "devfs", 0); run_program::run('/sbin/devfsd', '/dev'); -d '/lib/modules/' . c::kernel_version() or warn("ERROR: kernel package " . c::kernel_version() . " not installed\n"), c::_exit(1); modules::load_category('multimedia/sound'); system('sysctl -w kernel.hotplug="/bin/true"'); modules::load_category('bus/usb'); eval { modules::load('usb-storage', 'sd_mod') }; install_steps::setupSCSI($o); system('sysctl -w kernel.hotplug="/sbin/hotplug"'); handleMoveKey($o); drakx_stuff: $o->{steps}{handleI18NClp} = { reachable => 1, text => "Handle I18N CLP" }; $o->{steps}{verifyKey} = { reachable => 1, text => "Verify Key" }; $o->{steps}{startMove} = { reachable => 1, text => "Start Move" }; $o->{orderedSteps_orig} = $o->{orderedSteps}; $o->{orderedSteps} = [ qw(selectLanguage handleI18NClp acceptLicense verifyKey selectMouse selectKeyboard startMove) ]; $o->{steps}{first} = $o->{orderedSteps}[0]; #- don't use shadow passwords since pwconv overwrites /etc/shadow hence contents will be lost for usb key delete $o->{authentication}{shadow}; member($_, @ALLOWED_LANGS) or delete $lang::langs{$_} foreach keys %lang::langs; } sub lomount_clp { my ($name, $needed_file) = @_; my ($clp, $dir) = ("/cdrom/live_tree_$name.clp", "/image_$name"); -e "$dir$needed_file" and return; if (! -e $clp || cat_('/proc/cmdline') =~ /\blive\b/) { symlink "/cdrom/live_tree_$name", $dir; return; } log::l("lomount_clp: lomounting $name"); mkdir_p($dir); my $dev = devices::find_free_loop(); run_program::run('losetup', '-r', '-e', 'gz', $dev, $clp); run_program::run('mount', '-r', $dev, $dir); } sub install_TrueFS_in_home { my ($o) = @_; require fsedit; my $home = fsedit::mntpoint2part('/home', $o->{fstab}) or return; my %loopbacks = map { my $part = { type => 0x483, device => "/home/.mdkmove-$_", loopback_file => "/.mdkmove-$_", loopback_device => $home, mntpoint => "/home/$_/.mdkmove-truefs", size => 5 << 11, toFormat => ! -e "/home/.mdkmove-$_", }; $_ => $part; } list_users(); $home->{loopback} = [ values %loopbacks ]; fsedit::recompute_loopbacks($o->{all_hds}); $o->{fstab} = [ fsedit::get_all_fstab($o->{all_hds}) ]; install_steps_interactive::formatMountPartitions($o); foreach my $user (keys %loopbacks) { my $dir = $loopbacks{$user}{mntpoint}; run_program::run("/bin/chown", "$user.$user", $dir); foreach (qw(.kde)) { if (-d "/home/$user/$_" && ! -d "$dir/$_") { run_program::run('mv', "/home/$user/$_", "$dir/$_"); } mkdir $_ and run_program::run("/bin/chown", "$user.$user", $_) foreach "/home/$user/$_", "$dir/$_"; run_program::run('mount', '-o', 'bind', "$dir/$_", "/home/$user/$_"); } $ENV{ICEAUTHORITY} = "$dir/.ICEauthority"; } } sub install2::handleI18NClp { my $o = $::o; lomount_clp("always_i18n_$o->{locale}{lang}", '/usr'); } sub keys_parts { my ($o) = @_; my @keys = grep { $_->{usb_media_type} && index($_->{usb_media_type}, 'Mass Storage|') == 0 && $_->{media_type} eq 'hd' } @{$o->{all_hds}{hds}}; map_index { $_->{mntpoint} = $::i ? "/mnt/key$::i" : '/home'; $_->{options} = 'umask=077,uid=501,gid=501,shortname=mixed'; $_; } fsedit::get_fstab(@keys); } sub handleMoveKey { my ($o, $o_reread) = @_; if ($o_reread) { $o->{all_hds} = fsedit::empty_all_hds(); install_any::getHds($o, $o); } require fs; fs::mount_part($_) foreach keys_parts($o); } sub machine_ident { #- , c::get_hw_address('eth0'); before detect of network :( md5_hex(join '', (map { (split)[1] } cat_('/proc/bus/pci/devices'))); } sub install2::verifyKey { my ($o) = $::o; while (cat_('/proc/mounts') !~ m|\s/home\s|) { $o->ask_okcancel_({ title => N("Need a key to save your data"), messages => formatAlaTeX( N("We didn't detect any USB key on your system. If you plug in an USB key now, Mandrake Move will have the ability to transparently save the data in your home directory and system wide configuration, for next boot on this computer or another one. Note: if you plug in a key now, wait several seconds before detecting again. You may also proceed without an USB key - you'll still be able to use Mandrake Move as a normal live Mandrake Operating System.")), ok => N("Detect again USB key"), cancel => N("Continue without USB key") }) or return; handleMoveKey($o, 'reread'); } local *F; while (!open F, '>/home/.touched') { fs::umount_part($_) foreach keys_parts($o); modules::unload('usb-storage'); #- it won't notice change on write protection otherwise :/ $o->ask_okcancel_({ title => N("Key isn't writable"), messages => formatAlaTeX( N("The USB key seems to have write protection enabled. Please unplug it, remove write protection, and then plug it again.")), ok => N("Retry"), cancel => N("Continue without USB key") }) or return; modules::load('usb-storage'); sleep 2; handleMoveKey($o, 'reread'); } close F; unlink '/home/.touched'; my $wait = $o->wait_message(N("Setting up USB key"), N("Please wait, setting up system configuration files on USB key...")); mkdir '/home/.sysconf'; my $sysconf = '/home/.sysconf/' . machine_ident(); if (!-d $sysconf || cat_('/proc/cmdline') =~ /\bcleankey\b/) { rm_rf $sysconf; mkdir $sysconf; foreach (chomp_(cat_('/image/move/keyfiles'))) { mkdir_p("$sysconf/" . dirname($_)); system("cp $_ $sysconf$_"); symlinkf("$sysconf$_", $_); } system("cp /image/move/README.adding.more.files /home/.sysconf"); } else { foreach (chomp_(`find $sysconf -type f`)) { my ($path) = /^\Q$sysconf\E(.*)/; mkdir_p(dirname($path)); symlinkf($_, $path); } } #- /etc/sudoers can't be a link unlink($_), system("cp /image/$_ $_") foreach qw(/etc/sudoers); $wait = undef; } sub install2::startMove { my $o = $::o; #- just in case lomount_clp("always_i18n_$o->{locale}{lang}", '/usr'); if (cat_('/proc/cmdline') =~ /\buser=(\w+)/) { $o->{users} = [ { name => $1 } ]; } else { require any; any::ask_user_one($o, $o->{users} ||= [], $o->{security}, additional_msg => N("BLA BLA user for move, password for screensaver"), noaccept => 1, needauser => 1, noicons => 1); } #- force uid/gid to 501 as it was used when mounting key, addUser may choose 502 when key already holds user data put_in_hash($o->{users}[0], { uid => 501, gid => 501 }); require install_steps; install_steps::addUser($o); install_TrueFS_in_home($o); my $wait = $o->wait_message(N("Auto configuration"), N("Please wait, detecting and configuring devices...")); #- automatic printer, timezone, network configs require install_steps_interactive; if (cat_('/proc/mounts') !~ /nfs/) { install_steps_interactive::configureNetwork($o); #- seems that applications have trouble with the loopback interface #- after successful network configuration if we don't do that run_program::run('/sbin/service', 'network', 'restart'); } install_steps_interactive::summaryBefore($o); require install_any; install_any::write_fstab($o); modules::write_conf(''); detect_devices::install_addons(''); foreach my $step (@{$o->{orderedSteps_orig}}) { next if member($step, @{$o->{orderedSteps}}); while (my $f = shift @{$o->{steps}{$step}{toBeDone} || []}) { log::l("doing remaining toBeDone for undone step $step"); eval { &$f() }; $o->ask_warn(N("Error"), [ N("An error occurred, but I don't know how to handle it nicely. Continue at your own risk."), formatError($@) ]) if $@; } } $wait = undef; $::WizardWindow->destroy if $::WizardWindow; require ugtk2; my $root = ugtk2::gtkroot(); my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file('/usr/share/mdk/screensaver/3.png'); my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_height); $root->draw_pixbuf(Gtk2::Gdk::GC->new($root), $pixbuf, 0, 0, ($::rootwidth - $w) / 2, ($::rootheight - $h)/2, $w, $h, 'none', 0, 0); ugtk2::gtkflush(); run_program::run('/sbin/service', 'syslog', 'start'); run_program::run('killall', 'minilogd'); #- get rid of minilogd run_program::run('/sbin/service', 'syslog', 'restart'); #- otherwise minilogd will strike back my $username = $o->{users}[0]{name}; output('/var/run/console.lock', $username); output("/var/run/console/$username", 1); run_program::run('pam_console_apply'); if (fork()) { sleep 1; log::l("DrakX waves bye-bye"); (undef, undef, my $uid, my $gid, undef, undef, undef, my $home, my $shell) = getpwnam($username); $( = $) = "$gid $gid"; $< = $> = $uid; $ENV{LOGNAME} = $ENV{USER} = $username; $ENV{HOME} = $home; $ENV{SHELL} = $shell; exec 'startkde'; } else { exec 'xwait' or c::_exit(0); } } sub automatic_xconf { my ($o) = @_; log::l('automatic XFree configuration'); require Xconfig::default; $o->{raw_X} = Xconfig::default::configure({ KEYBOARD => 'uk' }, $o->{mouse}); #- using uk instead of us for now to have less warnings require Xconfig::main; require class_discard; Xconfig::main::configure_everything_auto_install($o->{raw_X}, class_discard->new, {}, { allowNVIDIA_rpms => [], allowATI_rpms => [], allowFB => $o->{allowFB} }); } 1;