summaryrefslogtreecommitdiffstats
path: root/cobbler/action_sync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-11 11:43:13 -0400
committerJim Meyering <jim@meyering.net>2006-10-11 11:43:13 -0400
commita0b61ddb6681474cc67a0667f679ceea08191d3e (patch)
treef53a45a96c8b961b82fc3d0ce1d5c3dd40efdc84 /cobbler/action_sync.py
parente3c21f3a12fe5350cc2a9d6b984304bb30293b96 (diff)
downloadthird_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.tar.gz
third_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.tar.xz
third_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.zip
(1) initial work on a command to import build trees into cobbler in
a really fast, automated way (2) bundling 2.4's subprocess as sub_process (it's supposed to work) since subprocess isn't available on 2.3 and we want to support lots of 2.3 machines
Diffstat (limited to 'cobbler/action_sync.py')
-rw-r--r--cobbler/action_sync.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 9d0725d..11d60d8 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -18,7 +18,7 @@ import os.path
import shutil
import time
import yaml # Howell-Clark version
-import subprocess
+import sub_process
import sys
from Cheetah.Template import Template
@@ -68,7 +68,7 @@ class BootSync:
if self.settings.manage_dhcp:
self.write_dhcp_file()
try:
- retcode = subprocess.call("/sbin/service dhcpd restart", shell=True)
+ retcode = sub_process.call("/sbin/service dhcpd restart", shell=True)
if retcode != 0:
print >>sys.stderr, "Warning: dhcpd restart failed"
except OSError, e:
@@ -393,8 +393,10 @@ class BootSync:
f2 = os.path.join(self.settings.tftpboot, "pxelinux.cfg", f1)
if system.pxe_arch == "ia64":
# elilo expects files to be named "$name.conf" in the root
- if system.pxe_address == "" or system.pxe_address is None:
- raise cexceptions.CobblerException("exc_ia64_noip",system.name)
+ # and can not do files based on the MAC address
+ if system.pxe_address == "" or system.pxe_address is None or not utils.is_ip(system.pxe_address):
+ raise cexceptions.CobblerException("exc_ia64_noip",system.name)
+
filename = "%s.conf" % self.get_pxe_filename(system.pxe_address)
f2 = os.path.join(self.settings.tftpboot, filename)