summaryrefslogtreecommitdiffstats
path: root/cobbler/action_check.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/action_check.py')
-rw-r--r--cobbler/action_check.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/cobbler/action_check.py b/cobbler/action_check.py
index f7bc9d9..1fb4734 100644
--- a/cobbler/action_check.py
+++ b/cobbler/action_check.py
@@ -17,6 +17,7 @@ import os
import re
import sub_process
import action_sync
+import utils
from rhpl.translate import _, N_, textdomain, utf8
class BootCheck:
@@ -140,8 +141,9 @@ class BootCheck:
"""
Check if cobbler.conf's tftpboot directory exists
"""
- if not os.path.exists(self.settings.tftpboot):
- status.append(_("please create directory: %(dirname)s") % { "dirname" : self.settings.tftpboot })
+ bootloc = utils.tftpboot_location()
+ if not os.path.exists(bootloc):
+ status.append(_("please create directory: %(dirname)s") % { "dirname" : bootloc })
def check_tftpd_conf(self,status):
@@ -152,17 +154,15 @@ class BootCheck:
if os.path.exists(self.settings.tftpd_conf):
f = open(self.settings.tftpd_conf)
re_disable = re.compile(r'disable.*=.*yes')
- found_bootdir = False
for line in f.readlines():
if re_disable.search(line):
status.append(_("change 'disable' to 'no' in %(file)s") % { "file" : self.settings.tftpd_conf })
- if line.find("-s %s" % self.settings.tftpboot) != -1:
- found_bootdir = True
- if not found_bootdir:
- status.append(_("change 'server_args' to '-s %(args)s' in %(file)s") % { "file" : "/etc/xinetd.d/tftp", "args" : self.settings.tftpboot })
-
else:
status.append(_("file %(file)s does not exist") % { "file" : self.settings.tftpd_conf })
+
+ bootloc = utils.tftpboot_location()
+ if not os.path.exists(bootloc):
+ status.append(_("directory needs to be created: %s" % bootloc))
def check_dhcpd_conf(self,status):