summaryrefslogtreecommitdiffstats
path: root/perl-install/wizards.pm
Commit message (Expand)AuthorAgeFilesLines
* Synthesized commit during git-svn import combining previous Mandriva history ...Mageia SVN-Git Migration2011-02-061-1/+1
* revert latest commit (drakwizard tests must be adjusted)Thierry Vignaud2007-10-041-1/+1
* fix #34371Nicolas Vigier2007-10-031-1/+1
* re-sync after the big svn lossPascal Rigaux2007-04-251-3/+3
* fix typoOlivier Blin2006-01-031-1/+1
* don't have a useless empty hash in wizards objects, use the wizards hashOlivier Blin2006-01-031-12/+12
* fix typoOlivier Blin2006-01-031-1/+1
* fix documentation typoOlivier Blin2006-01-031-1/+1
* - i had foolishly removed c::iconv whereas it was used still used by c::from_...Pascal Rigaux2005-12-151-1/+1
* remove some unneeded ";", add some for normalization (as told by perl_checker)Pascal Rigaux2004-11-181-5/+5
* do not ask to install already installed packages, prefer to installOlivier Blin2004-07-161-1/+1
* perl_checker compliancePascal Rigaux2004-05-111-1/+1
* enable default value to be dynamically computedThierry Vignaud2004-02-131-1/+1
* enable to pass untranslated defaut to yes/no or ok/cancel likeThierry Vignaud2004-02-131-2/+3
* default to next/finish when no field is presentThierry Vignaud2004-02-131-1/+1
* add 'default' field in order to be able to enforce default answer forThierry Vignaud2004-02-131-2/+3
* missing #7593 bitThierry Vignaud2004-02-131-1/+1
* use interactive->ask_okcancel in order to not have spurious field inThierry Vignaud2004-02-131-1/+6
* using box radio looks better for yes/no like questionsThierry Vignaud2004-01-141-1/+1
* (process) in yes/no case, keep the same logic asThierry Vignaud2004-01-141-3/+4
* add support for yes/no questionsThierry Vignaud2004-01-131-0/+4
* better rely on the end field being set rather than on the last step toThierry Vignaud2004-01-131-1/+1
* rollback debug statementsThierry Vignaud2004-01-121-7/+0
* only complain if a problem actually happenedThierry Vignaud2004-01-121-1/+8
* perl_checker cleanupsThierry Vignaud2004-01-061-3/+3
* perl_checker fixesPascal Rigaux2004-01-051-1/+1
* - die if empty page name or if non existent page nameThierry Vignaud2003-12-291-10/+64
* let a step name be a callback in order to be able to generate dynamicThierry Vignaud2003-12-211-1/+2
* (process) add val_ref and list_ref support to ease data manipulationThierry Vignaud2003-12-191-0/+2
* - consolidate code from drakwizard for reussage by drakxtools wizard:Thierry Vignaud2003-12-161-0/+137
s="hl kwb">$vg2status{$_->{vg}}}, delete $_->{status} foreach @l; map { delete $_->{size}; #- now irrelevant $_->{disks} = $vg2pv{$_->{vg}}; $_->{status} = (every { $_ eq 'ok' } @{$vg2status{$_->{vg}}}) ? 'ok' : join(' ', @{$vg2status{$_->{vg}}}); $_; } uniq_ { $_->{vg} } @l; } sub _sets_raw() { map { chomp; log::l("got: $_"); my %l; @l{qw(name size stride level status subsets devs spares)} = split(':'); if_(defined $l{spares}, \%l); } call_dmraid('-ccs'); } sub _sets() { my @sets = _sets_raw(); my @raid_devices = _raid_devices(); foreach (@sets) { my $name = $_->{name}; my @l = grep { begins_with($name, $_->{vg}) } @raid_devices; if (@l) { log::l("ERROR: multiple match for set $name: " . join(' ', map { $_->{vg} } @l)) if @l > 1; my ($raid) = @l; add2hash($_, $raid); $_->{status} = $raid->{status} if $_->{status} eq 'ok' && $::isInstall; } else { log::l("ERROR: no matching raid devices for set $name"); } } @sets; } sub vgs() { map { my $dev = "mapper/$_->{name}"; my $vg = fs::wild_device::to_subpart("/dev/$dev"); add2hash($vg, { media_type => 'hd', prefix => $dev, bus => "dmraid_$_->{format}", disks => $_->{disks} }); #- device should exist, created by dmraid(8) using libdevmapper #- if it doesn't, we suppose it's not in use if_(-e "/dev/$dev", $vg); } grep { if ($_->{status} eq 'ok') { 1; } else { call_dmraid('-an', $_->{vg}) if $::isInstall; #- for things like bad_sil below, deactivating half activated dmraid 0; } } _sets(); } if ($ENV{DRAKX_DEBUG_DMRAID}) { eval(<<'EOF'); my %debug_data = ( isw => { # dmraid -s #################### # *** Group superset isw_ffafgbdhi # --> Active Subset # name : isw_ffafgbdhi_toto # size : 234441216 # stride : 256 # type : mirror # status : ok # subsets: 0 # devs : 2 # spares : 0 '-ccs' => "isw_ffafgbdhi_toto:234441216:256:mirror:ok:0:2:0\n", # dmraid -r #################### #/dev/sda: isw, "isw_ffafgbdhi", GROUP, ok, 488397166 sectors, data@ 0 #/dev/sdb: isw, "isw_ffafgbdhi", GROUP, ok, 234441646 sectors, data@ 0 '-ccr' => "/dev/sda:isw:isw_ffafgbdhi:GROUP:ok:488397166:0\n" . "/dev/sdb:isw:isw_ffafgbdhi:GROUP:ok:234441646:0\n", }, pdc => { # dmraid -s #################### # *** Active Set # name : pdc_bcefbiigfg # size : 80043200 # stride : 128 # type : mirror # status : ok # subsets: 0 # devs : 2 # spares : 0 '-ccs' => "pdc_bcefbiigfg:80043200:128:mirror:ok:0:2:0\n", # dmraid -r #################### # /dev/sda: pdc, "pdc_bcefbiigfg", mirror, ok, 80043200 sectors, data@ 0 # /dev/sdb: pdc, "pdc_bcefbiigfg", mirror, ok, 80043200 sectors, data@ 0 '-ccr' => "/dev/sda:pdc:pdc_bcefbiigfg:mirror:ok:80043200:0\n" . "/dev/sdb:pdc:pdc_bcefbiigfg:mirror:ok:80043200:0\n", }, bad_sil => { '-ccs' => "sil_aeacdidecbcb:234439600:0:mirror:ok:0:1:0\n", # ERROR: sil: only 3/4 metadata areas found on /dev/sdb, electing... '-ccr' => "/dev/sdb:sil:sil_aeacdidecbcb:mirror:broken:234439600:0\n", # ERROR: sil: only 3/4 metadata areas found on /dev/sdb, electing... }, weird_nvidia => { '-ccs' => <<'EO', /dev/sda: "sil" and "nvidia" formats discovered (using nvidia)! /dev/sdb: "sil" and "nvidia" formats discovered (using nvidia)! nvidia_bcjdbjfa:586114702:128:mirror:ok:0:2:0 EO '-ccr' => <<'EO', /dev/sda: "sil" and "nvidia" formats discovered (using nvidia)! /dev/sdb: "sil" and "nvidia" formats discovered (using nvidia)! /dev/sda:nvidia:nvidia_bcjdbjfa:mirror:ok:586114702:0 /dev/sdb:nvidia:nvidia_bcjdbjfa:mirror:ok:586114702:0 EO # ERROR: multiple match for set nvidia_bcjdbjfa: nvidia_bcjdbjfa }, ); *call_dmraid = sub { my ($option, @args) = @_; if (my $s = $debug_data{$ENV{DRAKX_DEBUG_DMRAID}}{$option}) { split("\n", $s); } else { warn "dmraid $option @args\n"; } }; EOF $@ and die; } 1;