From 5e0c8768d1d3fd0e5434e265c386e154f65b6ebc Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 16 Oct 2009 16:07:42 +0000 Subject: extract detect_during_install --- perl-install/lvm.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 28a7cb41a..8f77ce06f 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -31,12 +31,14 @@ sub cylinder_size { init() or log::l("lvm::init failed"); +sub detect_during_install() { + run_program::run('lvm2', 'vgscan'); + run_program::run('lvm2', 'vgchange', '-a', 'y'); +} + sub init() { devices::init_device_mapper(); - if ($::isInstall) { - run_program::run('lvm2', 'vgscan'); - run_program::run('lvm2', 'vgchange', '-a', 'y'); - } + detect_during_install() if $::isInstall; 1; } -- cgit v1.2.1