sys-cluster/slurm: fix systemd units earlier
authorMikle Kolyada <zlogene@gentoo.org>
Fri, 25 Oct 2019 07:39:21 +0000 (10:39 +0300)
committerMikle Kolyada <zlogene@gentoo.org>
Fri, 25 Oct 2019 07:39:21 +0000 (10:39 +0300)
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
sys-cluster/slurm/slurm-19.05.3.2.ebuild

index 9487d67f72c900dacbd4f3fdabfd60fcb2ed26a8..4c9d3cbf4ae4d0f2cb5cc13aba2d7a6c8cf0ed7d 100644 (file)
@@ -101,6 +101,7 @@ src_prepare() {
        sed \
                -e 's:sysconfig/.*:conf.d/slurm:g' \
                -e 's:var/run/:run/slurm/:g' \
+               -e '/^EnvironmentFile=.*/d' \
                -i "${S}/etc"/*.service.in \
                || die "Can't sed systemd services for sysconfig or var/run/"
 
@@ -211,12 +212,6 @@ src_install() {
        # install systemd files
        systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf
        systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service
-
-       cd "${D}"/lib/systemd/system || die
-
-       for file in slurm*; do
-               sed -i -e '/^EnvironmentFile=.*/d' ${file} || die
-       done
 }
 
 pkg_preinst() {