Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-snmp: make addon configurable through gui settings
- Loading branch information
Showing
10 changed files
with
139 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
101 | ||
- make addon configurable | ||
|
||
100 | ||
- Initial addon | ||
- net-snmp 5.7.3 |
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
11 changes: 11 additions & 0 deletions
11
packages/addons/service/net-snmp/patches/net-snmp-0001-read_config.c.patch
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 @@ | ||
--- a/snmplib/read_config.c 2014-12-08 14:23:22.000000000 -0600 | ||
+++ b/snmplib/read_config.c 2017-03-30 12:21:16.351042803 -0500 | ||
@@ -1618,7 +1618,7 @@ | ||
* save a warning header to the top of the new file | ||
*/ | ||
snprintf(fileold, sizeof(fileold), | ||
- "%s%s# Please save normal configuration tokens for %s in SNMPCONFPATH/%s.conf.\n# Only \"createUser\" tokens should be placed here by %s administrators.\n%s", | ||
+ "%s%s# Please save normal configuration tokens for %s in /storage/.kodi/userdata/addon_data/service.net-snmp/share/snmp/%s.conf.\n# Only \"createUser\" tokens should be placed here by %s administrators.\n%s", | ||
"#\n# net-snmp (or ucd-snmp) persistent data file.\n#\n############################################################################\n# STOP STOP STOP STOP STOP STOP STOP STOP STOP \n", | ||
"#\n# **** DO NOT EDIT THIS FILE ****\n#\n# STOP STOP STOP STOP STOP STOP STOP STOP STOP \n############################################################################\n#\n# DO NOT STORE CONFIGURATION ENTRIES HERE.\n", | ||
type, type, type, |
15 changes: 15 additions & 0 deletions
15
packages/addons/service/net-snmp/patches/net-snmp-0002-net-snmp-create-v3-user.in.patch
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,15 @@ | ||
--- a/net-snmp-create-v3-user.in 2014-12-08 14:23:22.000000000 -0600 | ||
+++ b/net-snmp-create-v3-user.in 2017-03-30 13:20:56.336794994 -0500 | ||
@@ -28,10 +28,8 @@ | ||
NSC_SRCDIR="NET-SNMP-SOURCE-DIR" | ||
fi | ||
|
||
-if @PSCMD@ | egrep ' snmpd *$' > /dev/null 2>&1 ; then | ||
- echo "Apparently at least one snmpd demon is already running." | ||
- echo "You must stop them in order to use this command." | ||
- exit 1 | ||
+if @PSCMD@ | egrep 'snmpd'> /dev/null 2>&1 ; then | ||
+ systemctl stop service.net-snmp.service | ||
fi | ||
|
||
Aalgorithm="MD5" |
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
11 changes: 11 additions & 0 deletions
11
packages/addons/service/net-snmp/source/resources/language/English/strings.xml
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 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<strings> | ||
<!-- net-snmp --> | ||
<string id="32000">General</string> | ||
<string id="32001">Community</string> | ||
<string id="32002">Location</string> | ||
<string id="32003">Contact</string> | ||
<string id="32004">SNMP Version</string> | ||
<string id="32005">SNMP User</string> | ||
<string id="32006">SNMP Password</string> | ||
</strings> |
12 changes: 12 additions & 0 deletions
12
packages/addons/service/net-snmp/source/resources/settings.xml
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,12 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<settings> | ||
<!-- net-snmp --> | ||
<category label="32000"> | ||
<setting label="32001" id="COMMUNITY" type="text" default="libreelec"/> | ||
<setting label="32002" id="LOCATION" type="text" default="HOME"/> | ||
<setting label="32003" id="CONTACT" type="text" default="root@localhost"/> | ||
<setting label="32004" id="SNMPVERSION" type="labelenum" values="v1|v2c|v3" default="v2c"/> | ||
<setting label="32005" id="SNMPUSER" type="text" default="user"/> | ||
<setting label="32006" id="SNMPPASSWORD" type="text" default="password"/> | ||
</category> | ||
</settings> |
This file was deleted.
Oops, something went wrong.
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
Unfortunately, this does not apply to snmpv3. With snmpversion = v3, I get the following error
/storage/.kodi/userdata/addon_data/service.net-snmp/share/snmp/snmpd.conf: line 3: Error: bad security model, should be: v1, v2c or usm or a registered security plugin name
net-snmp: 1 error(s) in config file(s)
One should probably have v1 for snmpv1, v2c for snmpv2, and usm for snmpv3, see http://net-snmp.sourceforge.net/wiki/index.php/Vacm