Commit 584f6dcb authored by Leigh Stoller's avatar Leigh Stoller

Kill duplicate definition of myexec, moved to common file.

parent bd7fde06
......@@ -26,32 +26,6 @@ include_once("geni_defs.php");
chdir("apt");
include_once("instance_defs.php");
#
# So we can capture stderr. Sheesh.
#
function myexec($cmd)
{
ignore_user_abort(1);
$myexec_output_array = array();
$myexec_output = "";
$myexec_retval = 0;
exec("$cmd 2>&1", $myexec_output_array, $myexec_retval);
if ($myexec_retval) {
for ($i = 0; $i < count($myexec_output_array); $i++) {
$myexec_output .= "$myexec_output_array[$i]\n";
}
$foo = "Shell Program Error. Exit status: $myexec_retval\n";
$foo .= " '$cmd'\n";
$foo .= "\n";
$foo .= $myexec_output;
TBERROR($foo, 0);
return 1;
}
return 0;
}
#
# Return info to allow the client to load and start the auth process.
# This is entirely cause we want to have a login button on each page,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment