24 lines
943 B
Plaintext
24 lines
943 B
Plaintext
$OpenBSD: patch-includes_functions_php,v 1.14 2017/12/13 15:56:07 sthen Exp $
|
|
|
|
Index: includes/functions.php
|
|
--- includes/functions.php.orig
|
|
+++ includes/functions.php
|
|
@@ -433,7 +433,7 @@ function delete_device($id)
|
|
}
|
|
}
|
|
|
|
- $ex = shell_exec("bash -c '( [ ! -d ".trim(get_rrd_dir($host))." ] || rm -vrf ".trim(get_rrd_dir($host))." 2>&1 ) && echo -n OK'");
|
|
+ $ex = shell_exec("sh -c '( [ ! -d ".trim(get_rrd_dir($host))." ] || rm -rf ".trim(get_rrd_dir($host))." 2>&1 ) && echo -n OK'");
|
|
$tmp = explode("\n", $ex);
|
|
if ($tmp[sizeof($tmp)-1] != "OK") {
|
|
$ret .= "Could not remove files:\n$ex\n";
|
|
@@ -2445,7 +2445,7 @@ function return_num($entry)
|
|
function locate_binary($binary)
|
|
{
|
|
if (!str_contains($binary, '/')) {
|
|
- $output = `whereis -b $binary`;
|
|
+ $output = `whereis $binary`;
|
|
$target = trim(substr($output, strpos($output, ':') + 1));
|
|
|
|
if (file_exists($target)) {
|