From 706ac6a55c1a0dc1bf94f61cc51e2375e74e53db Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 2 Mar 2011 13:03:18 -0500 Subject: [PATCH] Add a /bin/login shim for use only in the installation environment. --- src/pylorax/installtree.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index 2d67d55b..92ef6ce7 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -358,6 +358,14 @@ class LoraxInstallTree(BaseLoraxClass): # create resolv.conf touch(joinpaths(self.root, "etc", "resolv.conf")) + # create a basic /bin/login script that'll automatically start up + # bash as a login shell. This is needed because we can't pass bash + # arguments from the agetty command line, and there's not really a + # better way to autologin root. + with open(joinpaths(self.root, "bin/login"), "w") as fobj: + fobj.write("#!/bin/bash\n") + fobj.write("exec -l /bin/bash\n") + def get_config_files(self, src_dir): # anaconda needs to change a couple of the default gconf entries gconf = joinpaths(self.root, "etc", "gconf", "gconf.xml.defaults")