$OpenBSD: patch-includes_common_php,v 1.15 2017/08/29 11:43:55 sthen Exp $

Index: includes/common.php
--- includes/common.php.orig
+++ includes/common.php
@@ -1122,7 +1122,11 @@ function version_info($remote = true)
         $output['local_sha']    = $local_sha;
         $output['local_date']   = $local_date;
         $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
+    } else {
+        $output['local_ver']    = '%LNMS_VERSION%';
+        $output['local_date']   = filemtime($config['install_dir'].'/CHANGELOG');
     }
+
     $output['db_schema']   = get_db_schema() ?: '?';
     $output['php_ver']     = phpversion();
     $output['mysql_ver']   = dbIsConnected() ? dbFetchCell('SELECT version()') : '?';
@@ -1130,7 +1134,7 @@ function version_info($remote = true)
         ($config['rrdtool'] ?: 'rrdtool') . ' --version |head -n1'
     )), 1, 1)));
     $output['netsnmp_ver'] = str_replace('version: ', '', rtrim(shell_exec(
-        ($config['snmpget'] ?: 'snmpget').' --version 2>&1'
+        ($config['snmpget'] ?: 'snmpget').' -V 2>&1'
     )));
 
     return $output;
@@ -1713,12 +1717,7 @@ function set_numeric($value, $default = 0)
 
 function check_git_exists()
 {
-    exec('git > /dev/null 2>&1', $response, $exit_code);
-    if ($exit_code === 1) {
-        return true;
-    } else {
-        return false;
-    }
+    return false;
 }
 
 function get_vm_parent_id($device)
