From 69ad288e66c8d04d661141821985a63b7a9cda53 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 96748901..7ee78e4f 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -383,11 +383,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"