diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -473,6 +473,9 @@ sub create_initrd_scriptlet { if_(get_media_setting($media, 'read_only'), "ro"), grep { $_ } get_media_setting($media, 'mount_options'), ); + my ($mount_first, $mount_last) = partition { !$loop{$_->{type}}{delay_mount} } + grep { exists $loop{$_->{type}}{mount} } @{$live->{mount}{dirs} || []}; + output_with_perm(get_builddir($live) . $live->{prefix}{build}{initrd} . '/' . $media->{storage} . '/init', 0755, join("\n", "#!/bin/nash", @@ -493,7 +496,7 @@ sub create_initrd_scriptlet { ($fs eq 'nfs' ? '/bin/mount -n -o ro,nolock' : 'mount') . if_(@mount_options, " -o " . join(",", @mount_options)) . " -t $fs " . get_media_setting($media, 'source') . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}", - (map { $loop{$_->{type}}{mount}->($live, $_) } grep { exists $loop{$_->{type}}{mount} } @{$live->{mount}{dirs} || []}), + (map { $loop{$_->{type}}{mount}->($live, $_) } @$mount_first, @$mount_last), ($live->{mount}{overlay} ? $overlay{$live->{mount}{overlay}}{mount}->($live) : ()), (map { ("/bin/mkdir -p $target$_", "/bin/mount -n --move $_ $target$_") } if_($live->{mount}{overlay}, $live->{prefix}{live}{mnt} . $live->{prefix}{media}{mnt}), |