Commit 91cc5ec7 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Changed ksinfo option to saner name

parent d417525b
......@@ -246,6 +246,9 @@ if __name__ == '__main__':
optParser.add_argument("--kickstart",
action="store", metavar="PREFIX",
help="kickstart file PREFIX")
optParser.add_argument("--kickstart_info",
action="store", metavar="FILE",
help="save kickstart info in FILE")
optParser.add_argument("--macosx_auto",
action="store", metavar="DIR",
help="Generate MacOSX autmount maps")
......@@ -264,9 +267,6 @@ if __name__ == '__main__':
optParser.add_argument("--pretty",
action="store_true", default=False,
help="pretty-print XML tree")
optParser.add_argument("--pxelinux",
action="store", metavar="DIR",
help="symlink DIR/<ethernet> to <kickstart>")
optParser.add_argument("--role",
default=[],
action="append", metavar="ROLE",
......@@ -319,6 +319,13 @@ if __name__ == '__main__':
for (f, c) in hostinfo.ifconfig.generate(tree, host):
file["%s/%s" % (options.ifconfig, f)] = c
if options.kickstart_info:
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[options.kickstart_info] = ksinfo
if options.macosx_auto:
for (f, c) in hostinfo.macosx_auto.generate(tree):
file["%s/%s" % (options.macosx_auto, f)] = c
......@@ -334,13 +341,6 @@ if __name__ == '__main__':
if options.netgroup:
file[options.netgroup] = hostinfo.yp.netgroup(tree)
if options.pxelinux:
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='utf-8'?>\n\n"
result += tree._xml(attr_sort=attr_sort, tag_sort=tag_sort)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment