diff options
author | Louis Bouchard <louis.bouchard@canonical.com> | 2013-04-15 15:47:24 +0200 |
---|---|---|
committer | Louis Bouchard <louis.bouchard@canonical.com> | 2013-04-15 15:47:24 +0200 |
commit | a6a3fdd49d8b8157b1c73ff2c7eba60215222f74 (patch) | |
tree | ca62bba76bef8847102cb79e0bf99e537d0baf11 | |
parent | edca8936672b482b70c40c07b738c3957fb68418 (diff) | |
download | sos-a6a3fdd49d8b8157b1c73ff2c7eba60215222f74.tar.gz |
Enabled plugin for Ubuntu/Debian
-rw-r--r-- | sos/plugins/pxe.py | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/sos/plugins/pxe.py b/sos/plugins/pxe.py index 4cdd2f76..3284bf34 100644 --- a/sos/plugins/pxe.py +++ b/sos/plugins/pxe.py @@ -12,19 +12,43 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -from sos.plugins import Plugin, RedHatPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin from os.path import exists -class pxe(Plugin, RedHatPlugin): +class Pxe(Plugin): """PXE related information """ - option_list = [("tftpboot", 'gathers content in /tftpboot', 'slow', False)] + plugin_name = "pxe" + + +class RedHatPxe(Pxe, RedHatPlugin): + """PXE related information for RedHat based distributions + """ + files = ('/usr/sbin/pxeos',) packages = ('system-config-netboot-cmd',) + option_list = [("tftpboot", 'gathers content in /tftpboot', 'slow', False)] + def setup(self): + super(RedHatPxe, self).setup() self.add_cmd_output("/usr/sbin/pxeos -l") self.add_copy_spec("/etc/dhcpd.conf") if self.get_option("tftpboot"): self.add_copy_spec("/tftpboot") + +class DebianPxe(Pxe, DebianPlugin, UbuntuPlugin): + """PXE related information for Ubuntu based distributions + """ + + packages = ('tftpd-hpa',) + + option_list = [("tftpboot", 'gathers content in /var/lib/tftpboot', 'slow', False)] + + def setup(self): + super(DebianPxe, self).setup() + self.add_copy_spec("/etc/dhcp/dhcpd.conf") + self.add_copy_spec("/etc/default/tftpd-hpa") + if self.get_option("tftpboot"): + self.add_copy_spec("/var/lib/tftpboot") |