From a21be149373f6cfdc675a8473e7944aaf31b81c8 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Tue, 15 Mar 2011 14:27:31 +0100 Subject: [PATCH] Copy shutdown and linuxrc.s390 on s390 --- src/pylorax/installtree.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index 04fac150..cda751a0 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -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"