BIND 10 #2692: Add support for NetBSD in isc-sysinfo
BIND 10 Development
do-not-reply at isc.org
Wed Feb 6 16:27:47 UTC 2013
#2692: Add support for NetBSD in isc-sysinfo
------------------------------------+-----------------------------------
Reporter: shane | Owner:
Type: enhancement | Status: new
Priority: medium | Milestone:
Component: sysinfo | Resolution:
Keywords: | CVSS Scoring:
Sensitive: 0 | Defect Severity: N/A
Sub-Project: Core | Feature Depending on Ticket:
Estimated Difficulty: 0 | Add Hours to Ticket: 0
Total Hours: 0 | Internal?: 0
------------------------------------+-----------------------------------
Comment (by jreed):
NetBSD support appears to be identical to OpenBSD, so here is a patch. I
tested on both systems.
{{{
diff --git a/src/lib/python/isc/sysinfo/sysinfo.py
b/src/lib/python/isc/sysinfo/sysinfo.py
index 3a59801..d298a46 100644
--- a/src/lib/python/isc/sysinfo/sysinfo.py
+++ b/src/lib/python/isc/sysinfo/sysinfo.py
@@ -325,8 +325,8 @@ class SysInfoBSD(SysInfoPOSIX):
except (subprocess.CalledProcessError, OSError):
self._net_connections = 'Warning: "netstat -nr" command
failed.\n'
-class SysInfoOpenBSD(SysInfoBSD):
- """OpenBSD implementation of the SysInfo class.
+class SysInfoNetBSD(SysInfoBSD):
+ """NetBSD and OpenBSD implementation of the SysInfo class.
See the SysInfo class documentation for more information.
"""
def __init__(self):
@@ -502,8 +502,8 @@ def SysInfoFromFactory():
osname = platform.system()
if osname == 'Linux':
return SysInfoLinux()
- elif osname == 'OpenBSD':
- return SysInfoOpenBSD()
+ elif (osname == 'NetBSD') or (osname == 'OpenBSD'):
+ return SysInfoNetBSD()
elif osname == 'FreeBSD':
return SysInfoFreeBSD()
elif osname == 'Darwin':
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2692#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list