summaryrefslogtreecommitdiffstats
path: root/advertising/list-pwp
Commit message (Collapse)AuthorAgeFilesLines
* update advertisings for Mageia 3Anne Nicolas2013-04-061-0/+3
|
* update advertising for final releaseAnne Nicolas2011-05-261-1/+5
|
* new info screens (alexn83/marcom)Romain d'Alverny2011-03-121-1/+3
|
* Synthesized commit during git-svn import combining previous Mandriva history ↵Mageia SVN-Git Migration2011-02-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with Mageia. This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line Add drakx structure on the SVN ------------------------------------------------------------------------ r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned advertising ------------------------------------------------------------------------ r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line Import Clean perl-install ------------------------------------------------------------------------ r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line Add cleaned files ------------------------------------------------------------------------ r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned kernel ------------------------------------------------------------------------ r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned tools ------------------------------------------------------------------------ r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line Import stage1 ------------------------------------------------------------------------ r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line Import images ------------------------------------------------------------------------ r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines readd missing file ------------------------------------------------------------------------ r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line Import rescue ------------------------------------------------------------------------ r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines import cleaned rescue for Mageia ------------------------------------------------------------------------ r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line import (cleaned) doc ------------------------------------------------------------------------
* update avertising for 2010Anne Nicolas2009-10-281-4/+4
|
* - Refreshed advertising screens for 2009.0Frederic Crozat2008-09-111-3/+3
|
* - Test with new advertising sizeFrederic Crozat2008-09-031-1/+1
|
* new images for 2008.1Pascal Rigaux2008-02-261-6/+5
|
* - 2008.0 advertising imagesPascal Rigaux2007-09-141-8/+6
| | | | | - drop *.pl files, not used by drakx-installer-stage2 anymore
* re-sync after the big svn lossPascal Rigaux2007-04-251-0/+8
opt">)); syscall_('mknod', $control, c::S_IFCHR() | 0600, makedev($major, $minor)) or die "mknod $control failed: $!"; } run_program::run('lvm2', 'vgscan') if !-e '/etc/lvmtab'; run_program::run('lvm2', 'vgchange', '-a', 'y'); } sub lvm_cmd { if (my $r = run_program::run('lvm2', @_)) { $r; } else { $? >> 8 == 98 or return; #- sometimes, it needs running vgscan again, doing so: run_program::run('lvm2', 'vgscan'); run_program::run('lvm2', @_); } } sub lvm_cmd_or_die { my ($prog, @para) = @_; lvm_cmd($prog, @para) or die "$prog failed\n"; } sub check { my ($in) = @_; $in->do_pkgs->ensure_is_installed('lvm2', '/sbin/lvm2') or return; init(); 1; } sub get_vg { my ($part) = @_; my $dev = expand_symlinks(devices::make($part->{device})); run_program::get_stdout('lvm2', 'pvs', '--noheadings', '-o', 'vg_name', $dev) =~ /(\S+)/ && $1; } sub update_size { my ($lvm) = @_; $lvm->{extent_size} = to_int(run_program::get_stdout('lvm2', 'vgs', '--noheadings', '--nosuffix', '--units', 's', '-o', 'vg_extent_size', $lvm->{VG_name})); $lvm->{totalsectors} = to_int(run_program::get_stdout('lvm2', 'vgs', '--noheadings', '--nosuffix', '--units', 's', '-o', 'vg_size', $lvm->{VG_name})); } sub get_lv_size { my ($lvm_device) = @_; to_int(run_program::get_stdout('lvm2', 'lvs', '--noheadings', '--nosuffix', '--units', 's', '-o', 'lv_size', "/dev/$lvm_device")); } sub get_lvs { my ($lvm) = @_; my @l = run_program::get_stdout('lvm2', 'lvs', '--noheadings', '--nosuffix', '--units', 's', '-o', 'lv_name', $lvm->{VG_name}) =~ /(\S+)/g; $lvm->{primary}{normal} = [ map { my $device = "$lvm->{VG_name}/$_"; my $type = -e "/dev/$device" && fsedit::typeOfPart($device); { device => $device, type => $type || 0x83, size => get_lv_size($device) } } @l ]; } sub vg_add { my ($part) = @_; my $dev = expand_symlinks(devices::make($part->{device})); lvm_cmd_or_die('pvcreate', '-y', '-ff', $dev); my $prog = lvm_cmd('vgs', $part->{lvm}) ? 'vgextend' : 'vgcreate'; lvm_cmd_or_die($prog, $part->{lvm}, $dev); } sub vg_destroy { my ($lvm) = @_; is_empty_array_ref($lvm->{primary}{normal}) or die N("Remove the logical volumes first\n"); lvm_cmd('vgchange', '-a', 'n', $lvm->{VG_name}); lvm_cmd_or_die('vgremove', $lvm->{VG_name}); foreach (@{$lvm->{disks}}) { delete $_->{lvm}; $_->{isFormatted} = 0; $_->{notFormatted} = 1; } } sub lv_delete { my ($lvm, $lv) = @_; lvm_cmd_or_die('lvremove', '-f', "/dev/$lv->{device}"); my $list = $lvm->{primary}{normal}; @$list = grep { $_ != $lv } @$list; } sub lv_create { my ($lvm, $lv) = @_; my $list = $lvm->{primary}{normal} ||= []; $lv->{lv_name} ||= 1 + max(map { if_($_->{device} =~ /(\d+)$/, $1) } @$list); $lv->{device} = "$lvm->{VG_name}/$lv->{lv_name}"; lvm_cmd_or_die('lvcreate', '--size', int($lv->{size} / 2) . 'k', '-n', $lv->{lv_name}, $lvm->{VG_name}); $lv->{size} = get_lv_size($lv->{device}); #- the created size is smaller than asked size $lv->{notFormatted} = 1; $lv->{isFormatted} = 0; push @$list, $lv; } sub lv_resize { my ($lv, $oldsize) = @_; lvm_cmd_or_die($oldsize > $lv->{size} ? ('lvreduce', '-f') : 'lvextend', '--size', int($lv->{size} / 2) . 'k', "/dev/$lv->{device}"); $lv->{size} = get_lv_size($lv->{device}); #- the resized partition may not be the exact asked size } 1;