Skip to content

Commit

Permalink
SERVER-7285: future proof ubuntu packaging with regards to systemd
Browse files Browse the repository at this point in the history
(cherry picked from commit f741411)
  • Loading branch information
Sam Kleinman committed Jul 15, 2016
1 parent 25c4706 commit 1f08e9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions buildscripts/packager.py
Expand Up @@ -463,9 +463,13 @@ def make_deb(distro, build_os, arch, spec, srcdir):
os.link(sdir+"debian/mongod.service", sdir+"debian/%s%s-server.mongod.service" % (distro.pkgbase(), suffix))
os.unlink(sdir+"debian/init.d")
elif re.search("ubuntu", distro.name()):
os.link(sdir+"debian/mongod.upstart", sdir+"debian/%s%s-server.mongod.upstart" % (distro.pkgbase(), suffix))
os.unlink(sdir+"debian/init.d")
os.unlink(sdir+"debian/mongod.service")
if build_os in ("ubuntu1204", "ubuntu1404", "ubuntu1410"):
os.link(sdir+"debian/mongod.upstart", sdir+"debian/%s%s-server.mongod.upstart" % (distro.pkgbase(), suffix))
os.unlink(sdir+"debian/mongod.service")
else:
os.link(sdir+"debian/mongod.service", sdir+"debian/%s%s-server.mongod.service" % (distro.pkgbase(), suffix))
os.unlink(sdir+"debian/mongod.upstart")
else:
raise Exception("unknown debianoid flavor: not debian or ubuntu?")
# Rewrite the control and rules files
Expand Down

0 comments on commit 1f08e9e

Please sign in to comment.