diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-10-10 16:10:22 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-10-10 16:10:22 -0400 |
commit | e3c21f3a12fe5350cc2a9d6b984304bb30293b96 (patch) | |
tree | 0b86ee9b1bfed5ccf51778b368b0e771f9fcf9ec | |
parent | af3688d2d8c038493d8b0f951fa1a339ad5fe5dd (diff) | |
download | third_party-cobbler-e3c21f3a12fe5350cc2a9d6b984304bb30293b96.tar.gz third_party-cobbler-e3c21f3a12fe5350cc2a9d6b984304bb30293b96.tar.xz third_party-cobbler-e3c21f3a12fe5350cc2a9d6b984304bb30293b96.zip |
Cobbler should reboot the system after enchanting it.
-rw-r--r-- | cobbler/action_enchant.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cobbler/action_enchant.py b/cobbler/action_enchant.py index b095875..b956db7 100644 --- a/cobbler/action_enchant.py +++ b/cobbler/action_enchant.py @@ -50,6 +50,9 @@ class Enchant: pro = self.config.profiles().find(self.profile) if pro is None: raise cexceptions.CobblerException("enchant_failed","no such profile: %s" % self.profile) + where_is_koan = os.path.join(self.settings.webdir,os.path.basename(koan)) + if not os.path.exists(where_is_koan): + raise cexceptions.CobblerException("enchant_failed","koan is missing") try: ssh = self.ssh = pxssh.pxssh() @@ -59,6 +62,7 @@ class Enchant: self.call("wget http://%s/cobbler/%s" % (self.settings.server, koan)) self.call("rpm -Uvh %s --force" % koan) self.call("koan --replace-self --profile=%s --server=%s" % (self.profile, self.settings.server)) + self.call("/sbin/reboot") return True except: traceback.print_exc() |