Revision
262
Author
blino
Date
2011-01-10 13:12:58 +0100 (Mon, 10 Jan 2011)

Log Message

use iurt_root_command to run chroot for --shell and --stop

Modified Paths

Modified: build_system/iurt/trunk/iurt2
===================================================================
--- build_system/iurt/trunk/iurt2	2011-01-10 11:58:26 UTC (rev 261)
+++ build_system/iurt/trunk/iurt2	2011-01-10 12:12:58 UTC (rev 262)
@@ -770,7 +770,7 @@
     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 @@
 		    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}");