aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/Chroot.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 5d3ff49..9ea6362 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -21,8 +21,6 @@ our @EXPORT = qw(
remove_chroot
);
-my $sudo = '/usr/bin/sudo';
-
=head2 clean_chroot($chroot, $run, $config)
Create or clean a chroot
@@ -186,7 +184,7 @@ sub add_local_user {
}
} else {
# the program has been launch as root, setting the home to /home/root for compatibility
- system($sudo, 'chroot', $chroot_tmp, 'usermod', '-d', "/home/$luser", '-u', $uid, '-o', '-l', $luser, 'root');
+ sudo($config, '--chroot', $chroot_tmp, 'usermod', '-d', "/home/$luser", '-u', $uid, '-o', '-l', $luser, 'root');
}
dump_rpmmacros($run, $config, "$chroot_tmp/home/$luser/.rpmmacros") or return;