All pastes #730056 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-08 20:55 UTC
rendered paste body
--- action_sync.py      2007-09-26 07:35:22.000000000 -0700
+++ /m1/homes/atobey/action_sync.py     2007-10-08 13:52:56.000000000 -0700
@@ -160,8 +160,7 @@
                 systxt = systxt + "    hardware ethernet %s;\n" % mac
                 if system.get_ip_address() != None:
                     systxt = systxt + "    fixed-address %s;\n" % system.get_ip_address()
-                # not needed, as it's in the template.
-                # systxt = systxt + "    next-server %s;\n" % self.settings.next_server
+                    systxt = systxt + "    next-server %s;\n" % self.settings.next_server
                 systxt = systxt + "}\n"
 
             else:
@@ -343,6 +342,8 @@
                 meta["yum_config_stanza"] = self.generate_config_stanza(g)
                 meta["kickstart_done"] = self.generate_kickstart_signal(g, None)
                 meta["kernel_options"] = utils.hash_to_string(meta["kernel_options"])
+                meta["ip_address"] = '127.0.0.1'
+                meta["hostname"] = 'localhost'
                 kfile = open(kickstart_path)
                 self.apply_template(kfile, meta, dest)
                 kfile.close()
@@ -475,6 +476,8 @@
                 meta["yum_config_stanza"] = self.generate_config_stanza(profile)
                 meta["kickstart_done"]  = self.generate_kickstart_signal(profile, s)
                 meta["kernel_options"] = utils.hash_to_string(meta["kernel_options"])
+               meta["ip_address"] = s.ip_address
+               meta["hostname"] = s.hostname
                 kfile = open(kickstart_path)
                 self.apply_template(kfile, meta, dest)
                 kfile.close()