Browse Source

[master] add NetBSD support

Actually the support was already there.
Renamed the OpenBSD class to NetBSD (since it was first)
and then use it for OpenBSD too (and NetBSD).

This is for ticket #2692. It was reviewed on jabber.
Jeremy C. Reed 12 years ago
parent
commit
4d074c3e70
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/lib/python/isc/sysinfo/sysinfo.py

+ 4 - 4
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':