diff options
author | Martin Sivak <msivak@redhat.com> | 2013-03-26 15:54:13 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2013-03-26 15:54:13 +0100 |
commit | dc556ed7dfca34c356c7efcfcda39db9c3108a8b (patch) | |
tree | c060a5e0d73fa14cac7a4c9ea14e8bf7301514eb | |
parent | 723500bd942bd4f98df752a507ab494f6fb97faf (diff) | |
download | firstboot2-dc556ed7dfca34c356c7efcfcda39db9c3108a8b.tar.gz firstboot2-dc556ed7dfca34c356c7efcfcda39db9c3108a8b.tar.xz firstboot2-dc556ed7dfca34c356c7efcfcda39db9c3108a8b.zip |
Do not execute 'old' ksdata and save the resulting ks to file in /root
-rw-r--r-- | initial_setup/__main__.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py index d240758..942b3a4 100644 --- a/initial_setup/__main__.py +++ b/initial_setup/__main__.py @@ -91,20 +91,33 @@ ret = ui.run() if ret == False: sys.exit(0) -# Print the kickstart file -# print data +# Do not execute sections that were part of the original +# anaconda kickstart file (== have .seen flag set) -data.keyboard.execute(None, data, None) -data.lang.execute(None, data, None) +sections = [data.keyboard, data.lang] -# data.selinux.execute(None, data, None) -# data.firewall.execute(None, data, None) -# data.timezone.execute(None, data, None) +# data.selinux +# data.firewall +# data.timezone +for section in sections: + if section.seen: + continue + section.execute(None, data, None) + +# Prepare the user database tools u = Users() -data.group.execute(None, data, None, u) -data.user.execute(None, data, None, u) -data.rootpw.execute(None, data, None, u) + +sections = [data.group, data.user, data.rootpw] +for section in sections: + if section.seen: + continue + section.execute(None, data, None, u) # Configure all addons data.addons.execute(None, data, None, u) + +# Print the kickstart data to file +with open("/root/initial-setup-ks.cfg", "w") as f: + f.write(str(data)) + |