aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-02 21:00:31 +0000
committerOlivier Blin <blino@mageia.org>2010-11-02 21:00:31 +0000
commitbf49eb540a181114f19c0fc2679436493f10c595 (patch)
tree76b5872d996ff4fe157d7f6a3d3569b273f47f1a /lib
parent6ee1e23d405a7b37b58ca8b3a4aa6167773d137c (diff)
downloadiurt-bf49eb540a181114f19c0fc2679436493f10c595.tar
iurt-bf49eb540a181114f19c0fc2679436493f10c595.tar.gz
iurt-bf49eb540a181114f19c0fc2679436493f10c595.tar.bz2
iurt-bf49eb540a181114f19c0fc2679436493f10c595.tar.xz
iurt-bf49eb540a181114f19c0fc2679436493f10c595.zip
use iurt_root_command to mount in chroot
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Chroot.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index b680c15..e23cf6f 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -91,17 +91,17 @@ sub clean_chroot {
plog('ERROR', "Failed to dump macros");
return;
}
- if (system("$sudo mount none -t proc $chroot/proc")) {
+ if (!sudo($run, $config, '--bindmount', "/proc", "$chroot/proc")) {
plog('ERROR', "Failed to mount proc");
return;
}
- if (system("$sudo mount none -t devpts $chroot/dev/pts")) {
+ if (!sudo($run, $config, '--bindmount', "/dev/pts", "$chroot/dev/pts")) {
plog('ERROR', "Failed to mount dev/pts");
return;
}
if ($run->{icecream}) {
system("$sudo mkdir -p $chroot/var/cache/icecream");
- if (system("$sudo mount -o bind /var/cache/icecream $chroot/var/cache/icecream")) {
+ if (!sudo($run, $config, '--bindmount', "/var/cache/icecream", "$chroot/var/cache/icecream")) {
plog('ERROR', "Failed to mount var/cache/icecream");
return;
}
@@ -113,8 +113,8 @@ sub clean_chroot {
my $mount_point = "$chroot/urpmi_medias";
my $url = $rep;
$url =~ s!^file://!!;
- system("$sudo mkdir -p $mount_point");
- if (system("$sudo mount -o bind,ro $url $mount_point")) {
+ sudo($run, $config, '--mkdir', '-p', $mount_point);
+ if (!sudo($run, $config, '--bindmount', $url, $mount_point)) {
plog('ERROR', "Failed to mount $url on $mount_point");
return;
}