summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2009-03-09 18:07:18 -0500
committerJames Cammarata <jimi@sngx.net>2009-03-09 18:11:55 -0500
commit97a4e13bafe7388c5106ed76e557801bc67d330a (patch)
treefc42aac5f81dd8182050b9865b1da67fa20354d1
parentbb5a8b41cd0ac8efe13d9d1aa3b9d344aeaed3b6 (diff)
downloadcobbler-97a4e13bafe7388c5106ed76e557801bc67d330a.tar.gz
cobbler-97a4e13bafe7388c5106ed76e557801bc67d330a.tar.xz
cobbler-97a4e13bafe7388c5106ed76e557801bc67d330a.zip
Removed check for tftpd rules file existance.
Added settings to allow for management of the ris-linux daemon. Added restart of ris-linuxd to the post trigger. Changed default location of tftpd_rules to /var/lib/cobbler/cobbler-tftpd.rules Corrected comment in tftpd-rules.template (removed reference to winos, everything gets capitalized for simplicity)
-rw-r--r--cobbler/action_check.py9
-rw-r--r--cobbler/modules/sync_post_restart_services.py25
-rw-r--r--cobbler/settings.py6
3 files changed, 24 insertions, 16 deletions
diff --git a/cobbler/action_check.py b/cobbler/action_check.py
index 01bb42ec..ea1fb66d 100644
--- a/cobbler/action_check.py
+++ b/cobbler/action_check.py
@@ -89,7 +89,6 @@ class BootCheck:
self.check_service(status,"smb")
self.check_smb_shares(status)
self.check_service(status,"ris-linuxd")
- self.check_tftpd_rules(status)
return status
@@ -315,14 +314,14 @@ class BootCheck:
using_rules = False
f = open(self.settings.tftpd_conf)
re_disable = re.compile(r'disable.*=.*yes')
- re_rules = re.compile(r'.*-m /etc/tftpd.rules.*')
+ re_rules = re.compile(r'.*-m %s.*' % self.settings.tftpd_rules)
for line in f.readlines():
if re_disable.search(line) and not line.strip().startswith("#"):
status.append(_("change 'disable' to 'no' in %(file)s") % { "file" : self.settings.tftpd_conf })
if re_rules.search(line):
using_rules = True
if not using_rules:
- status.append(_("tftpd not configured to use rules. Add '-m /etc/tftpd.rules' to the server_args line"))
+ status.append(_("tftpd not configured to use rules. Add '-m %s' to the server_args line") % self.settings.tftpd_rules)
else:
status.append(_("file %(file)s does not exist") % { "file" : self.settings.tftpd_conf })
@@ -331,10 +330,6 @@ class BootCheck:
status.append(_("directory needs to be created: %s" % bootloc))
- def check_tftpd_rules(self,status):
- if not os.path.exists("/etc/tftpd.rules"):
- status.append(_("tftpd rules are missing. Microsoft Windows remote installations will not work correctly"))
-
def check_dhcpd_conf(self,status):
"""
NOTE: this code only applies if cobbler is *NOT* set to generate
diff --git a/cobbler/modules/sync_post_restart_services.py b/cobbler/modules/sync_post_restart_services.py
index fa9699b9..65bc0282 100644
--- a/cobbler/modules/sync_post_restart_services.py
+++ b/cobbler/modules/sync_post_restart_services.py
@@ -22,14 +22,16 @@ def run(api,args):
settings = api.settings()
- manage_dhcp = str(settings.manage_dhcp).lower()
- manage_dns = str(settings.manage_dns).lower()
- manage_xinetd = str(settings.manage_xinetd).lower()
- restart_dhcp = str(settings.restart_dhcp).lower()
- restart_dns = str(settings.restart_dns).lower()
- restart_xinetd = str(settings.restart_xinetd).lower()
- omapi_enabled = str(settings.omapi_enabled).lower()
- omapi_port = str(settings.omapi_port).lower()
+ manage_dhcp = str(settings.manage_dhcp).lower()
+ manage_dns = str(settings.manage_dns).lower()
+ manage_ris_linuxd = str(settings.manage_ris_linuxd).lower()
+ manage_xinetd = str(settings.manage_xinetd).lower()
+ restart_dhcp = str(settings.restart_dhcp).lower()
+ restart_dns = str(settings.restart_dns).lower()
+ restart_ris_linuxd = str(settings.manage_ris_linuxd).lower()
+ restart_xinetd = str(settings.restart_xinetd).lower()
+ omapi_enabled = str(settings.omapi_enabled).lower()
+ omapi_port = str(settings.omapi_port).lower()
which_dhcp_module = module_loader.get_module_from_file("dhcp","module",just_name=True).strip()
which_dns_module = module_loader.get_module_from_file("dns","module",just_name=True).strip()
@@ -65,6 +67,13 @@ def run(api,args):
if manage_xinetd != "0" and restart_xinetd != "0":
rc = os.system("/sbin/service xinetd restart")
+ if rc != 0:
+ print "- error: service xinetd restart failed"
+
+ if manage_ris_linuxd != "0" and restart_ris_linuxd != "0":
+ rc = os.system("/sbin/service ris-linuxd restart")
+ if rc != 0:
+ print "- error: service ris-linuxd restart failed"
return rc
diff --git a/cobbler/settings.py b/cobbler/settings.py
index 2f2fddb3..bf94d24d 100644
--- a/cobbler/settings.py
+++ b/cobbler/settings.py
@@ -78,6 +78,7 @@ DEFAULTS = {
"kernel_options_s390x" : {},
"manage_dhcp" : 0,
"manage_dns" : 0,
+ "manage_ris_linuxd" : 0,
"manage_xinetd" : 0,
"manage_forward_zones" : [],
"manage_reverse_zones" : [],
@@ -99,13 +100,16 @@ DEFAULTS = {
"register_new_installs" : 0,
"restart_dns" : 1,
"restart_dhcp" : 1,
+ "restart_ris_linuxd" : 1,
"restart_xinetd" : 1,
+ "ris_linuxd_dir" : "/tftpboot/drivers",
+ "ris_linuxd_flags" : "",
"run_install_triggers" : 1,
"server" : "127.0.0.1",
"snippetsdir" : "/var/lib/cobbler/snippets",
"tftpd_bin" : "/usr/sbin/in.tftpd",
"tftpd_conf" : "/etc/xinetd.d/tftp",
- "tftpd_rules" : "/etc/tftpd.rules",
+ "tftpd_rules" : "/var/lib/cobbler/cobbler-tftpd.rules",
"vsftpd_bin" : "/usr/sbin/vsftpd",
"webdir" : "/var/www/cobbler",
"xmlrpc_port" : 25151,