[Mageia-sysadm] [262] use iurt_root_command to run chroot for --shell and --stop

root at mageia.org root at mageia.org
Mon Jan 10 13:12:58 CET 2011


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:
--------------
    build_system/iurt/trunk/iurt2

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}");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110110/cba69fe6/attachment.html>


More information about the Mageia-sysadm mailing list