aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2011-01-10 12:12:58 +0000
committerOlivier Blin <blino@mageia.org>2011-01-10 12:12:58 +0000
commit06d11c29708af3ebf5777990629d6898fe216594 (patch)
tree16ac951cf086e7ada165acf82cd1f6b4e165895e
parent006ac7133ac41df02a9ca28856c08ea359f7a281 (diff)
downloadiurt-06d11c29708af3ebf5777990629d6898fe216594.tar
iurt-06d11c29708af3ebf5777990629d6898fe216594.tar.gz
iurt-06d11c29708af3ebf5777990629d6898fe216594.tar.bz2
iurt-06d11c29708af3ebf5777990629d6898fe216594.tar.xz
iurt-06d11c29708af3ebf5777990629d6898fe216594.zip
use iurt_root_command to run chroot for --shell and --stop
-rwxr-xr-xiurt24
1 files changed, 2 insertions, 2 deletions
diff --git a/iurt2 b/iurt2
index a3efc83..509db22 100755
--- a/iurt2
+++ b/iurt2
@@ -770,7 +770,7 @@ if ($run{shell}) {
add_sudoers(\%run, $chroot_tmp, $luser);
if ($run{shell}) {
plog('NOTIFY', "dumping to a chrooted shell into $chroot_tmp");
- exec $sudo, 'chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash";
+ exec $sudo, $config->{iurt_root_command}, '--chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash";
die "FATAL $program_name: could not exec chroot to $chroot_tmp ($!)";
}
}
@@ -959,7 +959,7 @@ retry:
if ($run{stop}) {
plog("dumping to a chrooted shell into $chroot_tmp (pid $$)");
# exec does not work because it seems stdin and out are shared between children
- system($sudo, 'chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash");
+ system($sudo, $config->{iurt_root_command}, '--chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash");
exit();
}
plog('DEBUG', "calling callback for $opt->{hash}");