Skip to content

Commit 2aa1787

Browse files
committed
[tftpserver] Merge pxe plugin into tftpserver
The `pxe` plugin was both antiquated in that no currently supported distribution ships the `pxeos` command, and also duplicating some behavior best served by the `tftpserver` plugin. Move the relevant bits from `pxe` to `tftpserver`, then drop the `pxe` plugin. Add some additional collections to `tftpserver` such as service status collections. Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
1 parent df7fa5b commit 2aa1787

2 files changed

Lines changed: 17 additions & 57 deletions

File tree

sos/report/plugins/pxe.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

sos/report/plugins/tftpserver.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,33 @@
88
#
99
# See the LICENSE file in the source distribution for further information.
1010

11-
from sos.report.plugins import Plugin, IndependentPlugin
11+
from sos.report.plugins import Plugin, IndependentPlugin, PluginOpt
1212

1313

1414
class TftpServer(Plugin, IndependentPlugin):
1515

1616
short_desc = 'TFTP Server information'
1717
plugin_name = 'tftpserver'
1818
profiles = ('sysmgmt', 'network')
19-
19+
services = ('tftp', )
2020
files = ('/etc/xinetd.d/tftp',)
21-
packages = ('tftp-server',)
21+
packages = ('tftp-server', 'tftpd-hpa')
22+
option_list = [
23+
PluginOpt('tftpboot', default=False,
24+
desc='collect content from tftpboot path')
25+
]
2226

2327
def setup(self):
24-
self.add_dir_listing([
25-
'/var/lib/tftpboot',
28+
self.add_copy_spec('/etc/defaultd/tftp-hpa')
29+
30+
tftp_dirs = [
31+
'/srv/tftp',
2632
'/tftpboot',
27-
'/srv/tftp'
28-
], recursive=True)
33+
'/var/lib/tftpboot',
34+
]
35+
self.add_dir_listing(tftp_dirs, recursive=True)
36+
37+
if self.get_option('tftpboot'):
38+
self.add_copy_spec(tftp_dirs)
2939

3040
# vim: set et ts=4 sw=4 :

0 commit comments

Comments
 (0)