summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-12-15 18:24:57 +0000
committerOlivier Blin <oblin@mandriva.org>2005-12-15 18:24:57 +0000
commite9a3d4604f39dd3861cb7bfe7d7bf34587decb9a (patch)
tree25a6ab89744d30042fe77d9a21eb5f72cb20c311
parentd252b22a433a31a73f199ec015d038978390ca29 (diff)
downloaddrakx-e9a3d4604f39dd3861cb7bfe7d7bf34587decb9a.tar
drakx-e9a3d4604f39dd3861cb7bfe7d7bf34587decb9a.tar.gz
drakx-e9a3d4604f39dd3861cb7bfe7d7bf34587decb9a.tar.bz2
drakx-e9a3d4604f39dd3861cb7bfe7d7bf34587decb9a.tar.xz
drakx-e9a3d4604f39dd3861cb7bfe7d7bf34587decb9a.zip
always use system's losetup instead of nash's, required for loopbacks on read-only systems
-rwxr-xr-xtools/draklive12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/draklive b/tools/draklive
index 60ccfdb93..d14ee6c50 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -176,8 +176,7 @@ my %loop = (
mount => sub {
my ($live, $dir) = @_;
my @mnt = (
- ($live->{media}{fs} eq 'nfs' ? '/bin/losetup -r' : 'losetup') .
- " /dev/loop$loop_number $live->{media}{mountpoint}/$dir->{source}",
+ "/bin/losetup -r /dev/loop$loop_number $live->{media}{mountpoint}/$dir->{source}",
"mount -o ro -t squashfs /dev/loop$loop_number $dir->{mountpoint}");
$loop_number++;
@mnt;
@@ -269,15 +268,14 @@ sub create_initrd {
# cp_f($live->{system}{root} . '/sbin/nash', $live->{initrd_tree} . '/bin/');
#- use nash from cooker for now, label support
cp_f('/sbin/nash', $live->{initrd_tree} . '/bin/');
+ #- needed to mount loopbacks read-only
+ cp_f('/lib/tls/libc.so.6', $live->{initrd_tree} . '/lib/');
+ cp_f('/lib/ld-linux.so.2', $live->{initrd_tree} . '/lib/');
+ cp_f('/sbin/losetup', $live->{initrd_tree} . '/bin/');
- if ($live->{debug} || $live->{media}{fs} eq 'nfs') {
- cp_f('/lib/tls/libc.so.6', $live->{initrd_tree} . '/lib/');
- cp_f('/lib/ld-linux.so.2', $live->{initrd_tree} . '/lib/');
- }
if ($live->{media}{fs} eq 'nfs') {
cp_f('/sbin/ifconfig', $live->{initrd_tree} . '/bin/');
cp_f('/bin/mount', $live->{initrd_tree} . '/bin/');
- cp_f('/sbin/losetup', $live->{initrd_tree} . '/bin/');
if ($live->{debug}) {
cp_f('/bin/ping', $live->{initrd_tree} . '/bin/');
cp_f('/lib/libresolv.so.2', $live->{initrd_tree} . '/lib/');