$OpenBSD: patch-includes_functions_php,v 1.17 2018/02/27 15:17:39 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";
@@ -2419,7 +2419,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)) {
