diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 16:04:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 16:04:04 +0000 |
commit | 7b640adf291c14bafe8ad97fbd2b75ae6ae36df2 (patch) | |
tree | d825be4e8872dc2627a8497cedfb3497dc7c438c /perl-install/lvm.pm | |
parent | 2b5a80b3e3f0eac1012852f4f2987344870693db (diff) | |
download | drakx-backup-do-not-use-7b640adf291c14bafe8ad97fbd2b75ae6ae36df2.tar drakx-backup-do-not-use-7b640adf291c14bafe8ad97fbd2b75ae6ae36df2.tar.gz drakx-backup-do-not-use-7b640adf291c14bafe8ad97fbd2b75ae6ae36df2.tar.bz2 drakx-backup-do-not-use-7b640adf291c14bafe8ad97fbd2b75ae6ae36df2.tar.xz drakx-backup-do-not-use-7b640adf291c14bafe8ad97fbd2b75ae6ae36df2.zip |
create /dev/mapper/control (needed when you don't have devfs)
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r-- | perl-install/lvm.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 19ee9105f..c0e29450a 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -33,6 +33,13 @@ init(); sub init() { eval { modules::load('dm-mod') }; devices::make('urandom'); + my $control = '/dev/mapper/control'; + if (! -e $control) { + my ($major) = cat_('/proc/devices') =~ /(\d+) misc$/m or die "device-mapper error"; + my ($minor) = cat_('/proc/misc') =~ /(\d+) device-mapper$/m or die "device-mapper error"; + mkdir_p(dirname($control)); + 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'); } |