From dc973c1c9dc0ecf81d260c02d01aa12a6323ef1a Mon Sep 17 00:00:00 2001 From: Anders Blomdell <anders.blomdell@control.lth.se> Date: Thu, 25 Nov 2010 09:58:59 +0100 Subject: [PATCH] Version 2010-11-25 09:58 M src/hostinfo.py M src/hostinfo/pxelinux.py --- src/hostinfo.py | 7 +++++-- src/hostinfo/pxelinux.py | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hostinfo.py b/src/hostinfo.py index 570c6f7..aa7408d 100755 --- a/src/hostinfo.py +++ b/src/hostinfo.py @@ -251,8 +251,11 @@ if __name__ == '__main__': file["%s/%s" % (options.named, f)] = c if options.pxelinux: - for (f, c) in hostinfo.pxelinux.generate(tree, host): - symlink["%s/%s" % (options.pxelinux, f)] = c + ksinfo = "" + for (mac, host, ksfile) in hostinfo.pxelinux.generate(tree, host): + ksinfo += "%s %s %s\n" % (mac, host, ksfile) + # symlink["%s/%s" % (options.pxelinux, mac)] = ksfile + file["%s/ksinfo" % options.pxelinux] = ksinfo if options.pretty: result = "<?xml version='1.0' encoding='iso8859-1'?>\n\n" diff --git a/src/hostinfo/pxelinux.py b/src/hostinfo/pxelinux.py index 80140c7..ce7de35 100755 --- a/src/hostinfo/pxelinux.py +++ b/src/hostinfo/pxelinux.py @@ -7,5 +7,9 @@ def generate(tree, dhcphost): for i in tree._host_._interface_: if i.ethernet[0] and i._kickstart_: result.append(("01-" + i.ethernet[0].replace(':', '-'), + i.name[0:], i._kickstart_[0].file[0])) + pass + pass + result.sort() return result -- GitLab