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
This commit is contained in:
Matthew Thode 2017-07-18 00:52:39 -05:00
parent d09a654595
commit 8724b35c86
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8
1 changed files with 6 additions and 0 deletions

View File

@ -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')