From 8724b35c86e3b4e7c84a1fa114bdb3a6738572db Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 18 Jul 2017 00:52:39 -0500 Subject: [PATCH] prevent overwrite of gentoo init script Since there are two if clauses for installing init scripts and one of them has an else clause (the one not installing the gentoo init script), the if clause not installing the init script needs a noop upon detecting gentoo to prevent the overwrite of the gentoo init script. Change-Id: I4f930b026fa2f3285cfb195a4538903bcca12114 --- glean/install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glean/install.py b/glean/install.py index 9b03a0d..7ff8d4d 100755 --- a/glean/install.py +++ b/glean/install.py @@ -123,6 +123,12 @@ def main(): elif os.path.exists('/etc/init'): log.info("Installing upstart services") install('glean.conf', '/etc/init/glean.conf') + elif os.path.exists('/etc/gentoo-release'): + # If installing on Gentoo and if systemd or upstart is not + # detected, then prevent the installation of sysv init scripts + # on Gentoo, which would overwrite the OpenRC init scripts as + # the sysv init script uses the same path. + pass else: log.info("Installing sysv services") install('glean.init', '/etc/init.d/glean')