Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-mgmt/librenms: remove /usr/bin/env usage
This problem occurred on Nginx, but not Apache. Instead of "/usr/bin/env php", use "/usr/local/bin/php". While here: * add more to SHEBANG_FILES * portfmnt PR: 274248
- Loading branch information
Showing
3 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- LibreNMS/__init__.py.orig 2023-10-04 13:52:17 UTC | ||
+++ LibreNMS/__init__.py | ||
@@ -167,7 +167,7 @@ def get_config_data(base_dir): | ||
) | ||
logger.debug("Traceback:", exc_info=True) | ||
|
||
- config_cmd = ["/usr/bin/env", "php", "%s/config_to_json.php" % base_dir] | ||
+ config_cmd = "/usr/local/bin/php %s/config_to_json.php" % base_dir | ||
try: | ||
exit_code, output = command_runner(config_cmd, timeout=300, stderr=False) | ||
if exit_code != 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- snmp-scan.py.orig 2023-10-04 12:28:53 UTC | ||
+++ snmp-scan.py | ||
@@ -133,8 +133,7 @@ def scan_host(scan_ip): | ||
return Result(scan_ip, hostname, Outcome.NODNS, "DNS not Resolved") | ||
|
||
arguments = [ | ||
- "/usr/bin/env", | ||
- "lnms", | ||
+ "/usr/local/bin/lnms", | ||
"device:add", | ||
"-g", | ||
POLLER_GROUP, | ||
@@ -259,7 +258,7 @@ Example: 192.168.0.1/32 will be treated as a single ho | ||
chdir(install_dir) | ||
try: | ||
CONFIG = json.loads( | ||
- check_output(["/usr/bin/env", "php", "config_to_json.php"]).decode() | ||
+ check_output(["/usr/local/bin/php", "config_to_json.php"]).decode() | ||
) | ||
except CalledProcessError as e: | ||
parser.error( |