summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Initrd.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-05-26 18:54:22 +0000
committerOlivier Blin <oblin@mandriva.com>2009-05-26 18:54:22 +0000
commitae2a09cf9f6899d5526d56ed92b3091c14a6d153 (patch)
tree41cab976dd44587b98ec35470cb2c7d8671d3211 /lib/MDV/Draklive/Initrd.pm
parent4bcc83c24946c0d9b9049aaaede6a37b47d2c193 (diff)
downloaddrakiso-ae2a09cf9f6899d5526d56ed92b3091c14a6d153.tar
drakiso-ae2a09cf9f6899d5526d56ed92b3091c14a6d153.tar.gz
drakiso-ae2a09cf9f6899d5526d56ed92b3091c14a6d153.tar.bz2
drakiso-ae2a09cf9f6899d5526d56ed92b3091c14a6d153.tar.xz
drakiso-ae2a09cf9f6899d5526d56ed92b3091c14a6d153.zip
fix previous commit to update /boot/vmlinuz correctly
Diffstat (limited to 'lib/MDV/Draklive/Initrd.pm')
-rw-r--r--lib/MDV/Draklive/Initrd.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index 4147a90..c02fa5b 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -266,17 +266,19 @@ sub add_splash {
sub create_classical_initrd {
my ($live) = @_;
+ my $root = $live->get_system_root;
my $kernel = $live->find_kernel;
#- FIXME: use bootloader-config and allow it not to require a bootloader?
print "using kernel $kernel\n";
+
+ my $vmlinuz_long = '/boot/vmlinuz-' . $kernel;
+ my $vmlinuz_short = '/boot/vmlinuz';
symlinkf(basename($vmlinuz_long), $root . $vmlinuz_short);
+
$live->{system}{no_initrd} and return;
my $initrd_long = '/boot/initrd-'. $kernel . '.img';
my $initrd_short = '/boot/initrd.img';
- my $vmlinuz_long = '/boot/vmlinuz-' . $kernel;
- my $vmlinuz_short = '/boot/vmlinuz';
- my $root = $live->get_system_root;
run_({}, 'mount', '-t', 'proc', '/proc', $root . '/proc');
run_({}, 'mount', '-t', 'sysfs', '/sys', $root . '/sys');
run_({ root => $root }, 'mkinitrd', '-v', '-f', $initrd_long, $kernel);