diff options
-rwxr-xr-x | draklive | 26 |
1 files changed, 10 insertions, 16 deletions
@@ -438,35 +438,29 @@ sub create_initrd_for_media { map { $_->{mountpoint} } @{$live->{mount}{dirs} || []}; #- use nash with label support - cp_f(get_system_root($live) . '/sbin/nash', $initrd_tree . '/bin/'); + inst_initrd_bin(get_system_root($live), $initrd_tree, '/sbin/nash'); + inst_initrd_bin(get_system_root($live), $initrd_tree, '/usr/lib/drakx-installer-binaries/probe-modules'); + inst_initrd_bin(get_system_root($live), $initrd_tree, '/sbin/blockdev') + if get_media_setting($media, 'rereadpt'); + inst_initrd_bin(get_system_root($live), $initrd_tree, '/usr/bin/strace') + if $live->{debug}; #- busybox is required to: #- detect usb-storage process (we need sh/while/ps/grep) #- mount loopbacks read-only with losetup (useful over NFS) - my $busybox = get_system_root($live) . '/usr/bin/busybox'; - cp_f($busybox, $initrd_tree . '/bin') - or die "unable to copy busybox from system chroot\n"; - my @l = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `$busybox`; + my $busybox = '/usr/bin/busybox'; + inst_initrd_bin(get_system_root($live), $initrd_tree, $busybox); + my $busybox_rooted = get_system_root($live) . $busybox; + my @l = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `$busybox_rooted`; shift @l; symlink('busybox', $initrd_tree . "/bin/$_") foreach @l; - cp_f(get_system_root($live) . "/usr/lib/drakx-installer-binaries/probe-modules", $initrd_tree . '/bin'); - - my $rrpt_dev = get_media_setting($media, 'rereadpt'); - if ($rrpt_dev) { - $need_libs = 1; - cp_f(get_system_root($live) . '/sbin/blockdev', $initrd_tree . '/bin') - or die "unable to copy blockdev from system chroot\n"; - } - my $fs = get_media_setting($media, 'fs'); my @loop_types = uniq(map { $_->{type} } @{$live->{mount}{dirs}}); inst_initrd_bin(get_system_root($live), $initrd_tree, $_) foreach @{$storage_fs{$fs} && $storage_fs{$fs}{files} || []}, (map { @{$loop{$_} && $loop{$_}{files} || []} } @loop_types); - inst_initrd_bin(get_system_root($live), $initrd_tree, '/usr/bin/strace') if $live->{debug}; - output_p($initrd_tree . '/etc/fstab', ''); output_p($initrd_tree . '/etc/mtab', ''); |