diff options
Diffstat (limited to 'tools/drakx-in-chroot')
-rwxr-xr-x | tools/drakx-in-chroot | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot index 15828e53d..6073ce236 100755 --- a/tools/drakx-in-chroot +++ b/tools/drakx-in-chroot @@ -16,16 +16,21 @@ my $AUTO_INSTALL_ROOTED = '/tmp/auto_inst.cfg.pl'; my $DEFCFG_ROOTED = '/tmp/defcfg.pl'; my $RPMSRATE_ROOTED = '/tmp/rpmsrate'; my $resolution = '800x600'; +my $repository_uri; @ARGV >= 2 or die "usage: drakx-in-chroot <root of distrib> <dir to install to> [options]\n \nOptions specific to drakx-in-chroot: - --resolution=XXXxYYYY (eg: --resolution=1024x768)\n"; + --resolution=XXXxYYYY (eg: --resolution=1024x768)\n + --repository=<path> path of packages repository +"; (my $repository, my $dir, @ARGV) = @ARGV; foreach (@ARGV) { $i++; if (/--resolution=(.*)/) { $resolution = $1; + } elsif (/--repository=(.*)/) { + $repository_uri = $1; } } my ($repository_without_arch, $repository_arch) = basename($repository) eq arch() ? (dirname($repository), '/' . arch()) : ($repository, ''); @@ -64,7 +69,14 @@ if ($remote_repository) { } sys("$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED"); -sys("$sudo mount -o bind $repository_without_arch $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if !$remote_repository; + +if ($repository_uri) { + $repository_uri = '/C/cooker/i586'; +} elsif (!$remote_repository) { + $repository_uri = $repository_without_arch; +} +sys("$sudo mount -o bind $repository_uri $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if $repository_uri; + sys("$sudo mount -t proc none $SLASH_LOCATION/proc"); sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys"); symlinkf('media' . $repository_arch, "$SLASH_LOCATION$IMAGE_LOCATION_ROOTED"); |