Copy shutdown and linuxrc.s390 on s390

This commit is contained in:
Martin Gracik 2011-03-15 14:27:31 +01:00
parent e372574f32
commit a21be14937
1 changed files with 18 additions and 5 deletions

View File

@ -355,11 +355,24 @@ class LoraxInstallTree(BaseLoraxClass):
fobj.write(text)
def misc_tree_modifications(self):
# replace init with anaconda init
src = joinpaths(self.root, "usr", self.libdir, "anaconda", "init")
dst = joinpaths(self.root, "sbin", "init")
os.unlink(dst)
shutil.copy2(src, dst)
if self.basearch in ("s390", "s390x"):
# copy shutdown
src = joinpaths(self.root, "usr/libexec/anaconda/shutdown")
dst = joinpaths(self.root, "sbin", "init")
os.unlink(dst)
shutil.copy2(src, dst)
# copy linuxrc.s390
src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390")
dst = joinpaths(self.root, "sbin", "init")
os.unlink(dst)
shutil.copy2(src, dst)
else:
# replace init with anaconda init
src = joinpaths(self.root, "usr", self.libdir, "anaconda", "init")
dst = joinpaths(self.root, "sbin", "init")
os.unlink(dst)
shutil.copy2(src, dst)
# init symlinks
target = "/sbin/init"