summaryrefslogtreecommitdiffstats
path: root/cobbler/action_litesync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-05-30 16:16:46 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-05-30 16:16:46 -0400
commitb8c7846c557c6c0cf69003cf9475df36195e5065 (patch)
treec3b051bcf8c40944b37e997f531ea220e43e927e /cobbler/action_litesync.py
parent9fb76485117054903d950256089c66f9e08f8bb5 (diff)
downloadthird_party-cobbler-b8c7846c557c6c0cf69003cf9475df36195e5065.tar.gz
third_party-cobbler-b8c7846c557c6c0cf69003cf9475df36195e5065.tar.xz
third_party-cobbler-b8c7846c557c6c0cf69003cf9475df36195e5065.zip
WIP: Allow system names to be anything, and gather mac address and IP from
either the inferred sytem name or the values given to --ip-address (--ip) or --mac-address (--mac). Change the action code to use this, and not create PXE entries when such info is not available.
Diffstat (limited to 'cobbler/action_litesync.py')
-rw-r--r--cobbler/action_litesync.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py
index e3d63e6..8828daa 100644
--- a/cobbler/action_litesync.py
+++ b/cobbler/action_litesync.py
@@ -106,13 +106,15 @@ class BootLiteSync:
self.sync.validate_kickstart_for_specific_system(system)
def remove_single_system(self, name):
+ system_record = self.systems.find(name)
# rebuild system_list file in webdir
self.sync.write_listings()
# delete system YAML file in systems/$name in webdir
self.sync.rmfile(os.path.join(self.settings.webdir, "systems", name))
# delete contents of kickstarts_sys/$name in webdir
- filename = self.sync.get_pxe_filename(name)
- self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", filename))
+ if system_record.is_pxe_supported():
+ filename = self.sync.get_config_filename(system_record)
+ self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", filename))
# delete PXE Linux configuration file (which might be in one of two places)
itanic = False