summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-12-13 17:07:36 +0000
committerOlivier Blin <oblin@mandriva.com>2007-12-13 17:07:36 +0000
commit984804f94a0bd9f72ef4cebd838b3c5d7591f85a (patch)
tree3e93c02f682786f287abaa31a90ad6ccd293ece6
parentac76bff5c5aa0856549962c99661c3ac26c87081 (diff)
downloaddraklive-984804f94a0bd9f72ef4cebd838b3c5d7591f85a.tar
draklive-984804f94a0bd9f72ef4cebd838b3c5d7591f85a.tar.gz
draklive-984804f94a0bd9f72ef4cebd838b3c5d7591f85a.tar.bz2
draklive-984804f94a0bd9f72ef4cebd838b3c5d7591f85a.tar.xz
draklive-984804f94a0bd9f72ef4cebd838b3c5d7591f85a.zip
use inst_initrd_bin when possible, and groupir
-rwxr-xr-xdraklive26
1 files changed, 10 insertions, 16 deletions
diff --git a/draklive b/draklive
index 31736bf..e1bcbbd 100755
--- a/draklive
+++ b/draklive
@@ -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', '');