summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-17 22:07:29 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-17 22:07:29 +0000
commit6927684ac1bfe29584e5eb78ec269dd9321b4d26 (patch)
treea1bf2613d05b9a50b4c78758ea56894a59a93923
parent5545c0c24872e2bdd24b0369b41103e3ed1b3260 (diff)
downloaddraklive-6927684ac1bfe29584e5eb78ec269dd9321b4d26.tar
draklive-6927684ac1bfe29584e5eb78ec269dd9321b4d26.tar.gz
draklive-6927684ac1bfe29584e5eb78ec269dd9321b4d26.tar.bz2
draklive-6927684ac1bfe29584e5eb78ec269dd9321b4d26.tar.xz
draklive-6927684ac1bfe29584e5eb78ec269dd9321b4d26.zip
move new root mount point in /sysroot, so that live dir can be properly removed from initramfs
-rwxr-xr-xdraklive5
1 files changed, 4 insertions, 1 deletions
diff --git a/draklive b/draklive
index c91f601..b1f224c 100755
--- a/draklive
+++ b/draklive
@@ -461,6 +461,7 @@ sub create_initrd_for_media {
sub create_initrd_scriptlet {
my ($live, $media, @modules) = @_;
my $target = $live->{prefix}{live}{mnt} . ($live->{mount}{root} || $live->{prefix}{media}{mnt});
+ my $sysroot = '/sysroot';
my $pre = get_media_setting($media, 'pre');
my $fs = get_media_setting($media, 'fs');
my $rrpt_dev = get_media_setting($media, 'rereadpt');
@@ -495,7 +496,9 @@ sub create_initrd_scriptlet {
if_($live->{mount}{overlay}, $live->{prefix}{live}{mnt} . $live->{prefix}{media}{mnt}),
map { $live->{prefix}{live}{mnt} . $_->{mountpoint} } grep { !$_->{fallback} } @{$live->{mount}{dirs} || []}
),
- "switchroot --nomovedev $target",
+ "/bin/mkdir -p $sysroot",
+ "/bin/mount -n --move $target $sysroot",
+ "switchroot --nomovedev $sysroot",
if_($live->{system}{initrd_post}, deref_array($live->{system}{initrd_post})),
""));
}