summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-08 10:11:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-08 10:11:26 +0000
commit27379879c56c139b61dd3312001b7aab4e8388de (patch)
tree4a65e4f6e02343a00e73c7b2dd1a6365cc05119a /perl-install/partition_table
parentdc07e001a001266d00a1dedece8a5cecc7f1eee6 (diff)
downloaddrakx-27379879c56c139b61dd3312001b7aab4e8388de.tar
drakx-27379879c56c139b61dd3312001b7aab4e8388de.tar.gz
drakx-27379879c56c139b61dd3312001b7aab4e8388de.tar.bz2
drakx-27379879c56c139b61dd3312001b7aab4e8388de.tar.xz
drakx-27379879c56c139b61dd3312001b7aab4e8388de.zip
- allow using diskdrake even if there is only a lvm PV on full disk available
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r--perl-install/partition_table/lvm.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/partition_table/lvm.pm b/perl-install/partition_table/lvm.pm
new file mode 100644
index 000000000..91a9dfbc5
--- /dev/null
+++ b/perl-install/partition_table/lvm.pm
@@ -0,0 +1,25 @@
+package partition_table::lvm; # $Id: $
+
+# LVM on full disk
+
+use diagnostics;
+use strict;
+
+our @ISA = qw(partition_table::raw);
+
+use common;
+use partition_table::raw;
+use fs::type;
+use lvm;
+
+sub initialize {
+ my ($hd) = @_;
+
+ my $part = { size => $hd->{totalsectors}, device => $hd->{device} };
+ add2hash($part, fs::type::type_name2subpart('Linux Logical Volume Manager'));
+
+ $hd->{readonly} = $hd->{getting_rid_of_readonly_allowed} = 1;
+ $hd->{primary}{normal} = [ $part ];
+
+ bless $hd, 'partition_table::lvm';
+}