summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive-install7
1 files changed, 4 insertions, 3 deletions
diff --git a/draklive-install b/draklive-install
index 0dd21d6..26a6550 100755
--- a/draklive-install
+++ b/draklive-install
@@ -19,6 +19,7 @@ use partition_table;
use MDK::Common;
use common;
use feature qw(state);
+use File::Basename;
($::real_windowwidth, $::real_windowheight) = (600, 400);
@@ -59,7 +60,7 @@ sub install_live() {
my %settings = getVarsFromSh($system_file);
my $copy_source = $settings{SOURCE} || '/';
- my $live_media = '/live/media';
+ my $live_media = 'Mageia-*-*-LiveDVD'; # match disk label for all Mageia Live ISOS
display_start_message();
init_hds($in, $all_hds, $fstab, $live_media);
@@ -136,8 +137,8 @@ sub init_hds {
#- fs::any::get_hds does not return mounts that are not in fstab
my @mounted = fs::read_fstab('', '/proc/mounts');
- my $live_part = find { $_->{mntpoint} eq $live_media } @mounted;
- my $live_device = $live_part && $live_part->{device};
+
+ my $live_device = basename(readlink(glob "/dev/disk/by-label/$live_media"));
#- remove live device from the detected hds, so that bootloader is not installed on it:
#- bootloader installation uses first device from detect_devices::get, which tries to list devices
#- by booting order, and our live system is likely to be here in first position