summaryrefslogtreecommitdiff
path: root/net-mgmt/librenms/files/patch-validate.php
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2017-06-06 13:38:52 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2017-06-06 13:38:52 +0000
commit9404e62876a9b21354c09d5a9bccd8bad717d6d7 (patch)
tree0b080a9fb15cd85404c9d276cf65b5565a1e78f9 /net-mgmt/librenms/files/patch-validate.php
parentMOVED: Fix sysutils/jail2 entry (diff)
net-mgmt/librenms: Update version 1.26=>1.28
- Fixed an issue where services-wrapper wasn't working (by adding the PATH line to the crontab) [1] - Fixed a permissions issue with some directories [1] - Added patch to validate.php which allows it to work correctly (accidentally ommitted from previous commit) [1] PR: 218608[1] Submitted by: freebsd@jonathanprice.org[1]
Diffstat (limited to 'net-mgmt/librenms/files/patch-validate.php')
-rw-r--r--net-mgmt/librenms/files/patch-validate.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/net-mgmt/librenms/files/patch-validate.php b/net-mgmt/librenms/files/patch-validate.php
new file mode 100644
index 000000000000..e51e72d137f2
--- /dev/null
+++ b/net-mgmt/librenms/files/patch-validate.php
@@ -0,0 +1,39 @@
+--- validate.php.orig 2017-04-11 18:45:34 UTC
++++ validate.php
+@@ -108,13 +108,6 @@ if (!($username === 'root' || (isset($co
+ print_fail('You need to run this script as root' . (isset($config['user']) ? ' or '.$config['user'] : ''));
+ }
+
+-if ($git_found === true) {
+- if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
+- $commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
+- print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
+- }
+-}
+-
+ // Check php modules we use to make sure they are loaded
+ $extensions = array('pcre','curl','session','snmp','mcrypt');
+ foreach ($extensions as $extension) {
+@@ -302,22 +295,6 @@ if (dbFetchCell('SELECT COUNT(*) FROM `d
+ }
+
+
+-if ($git_found === true) {
+- if ($versions['local_branch'] != 'master') {
+- print_warn("Your local git branch is not master, this will prevent automatic updates.");
+- }
+-
+- // check for modified files
+- $modifiedcmd = 'git diff --name-only --exit-code';
+- if ($username === 'root') {
+- $modifiedcmd = 'su '.$config['user'].' -c "'.$modifiedcmd.'"';
+- }
+- exec($modifiedcmd, $cmdoutput, $code);
+- if ($code !== 0 && !empty($cmdoutput)) {
+- print_warn("Your local git contains modified files, this could prevent automatic updates.\nModified files:");
+- print_list($cmdoutput, "\t %s\n");
+- }
+-}
+ // Modules test
+ $modules = explode(',', $options['m']);
+ foreach ($modules as $module) {