Unit file attached. (tested on app-laptop/laptop-mode-tools-1.55-r2 and systemd-37) inherit eutils systemd src_install(){... systemd_dounit "${FILESDIR}/laptop_mode.service" Reproducible: Sometimes
Created attachment 295061 [details] laptop_mode service file
Upstream is pretty silent on the issue http://mailman.samwel.tk/pipermail/laptop-mode/2011-March/000406.html Quoting mgorny on #gentoo-desktop preemptively. "systemd policy is to have unit files installed by packages themselves"
Comment on attachment 295061 [details] laptop_mode service file That service file is really bad. You really aren't supposed to reproduce tmpfiles.d in .service files.
Created attachment 295491 [details] new service file. Ack, my bad. Toggling the enabled file remains rather nasty touch & rm, since it needs to be removed and created on start/stop.
Created attachment 295493 [details] tmpfiles.d conf Such tmpfiles.d config files do not seem popular on gentoo, since ebuilds create these directories. For some reason these directories are sometimes removed, which may be just my broken system, feel free to ignore this file, if this is the case. systemd_dotmpfilesd can be used for this in a manner similar to systemd_dounit
1.62 upstream version install systemd files itself... but per QA warning looks like they should be installed by systemd.eclass :/
(In reply to comment #6) > 1.62 upstream version install systemd files itself... but per QA warning > looks like they should be installed by systemd.eclass :/ Isn't that the warning that you should use systemd.eclass to get the path for appropriate configure option?
(In reply to comment #7) > (In reply to comment #6) > > 1.62 upstream version install systemd files itself... but per QA warning > > looks like they should be installed by systemd.eclass :/ > > Isn't that the warning that you should use systemd.eclass to get the path > for appropriate configure option? Probably because it installs systemd file under /lib: * QA Notice: package installs systemd unit files (/lib/systemd/system) * but does not inherit systemd.eclass. but, since it relies on its own script to install, I guess will need to sed the script a bit
(In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #6) > > > 1.62 upstream version install systemd files itself... but per QA warning > > > looks like they should be installed by systemd.eclass :/ > > > > Isn't that the warning that you should use systemd.eclass to get the path > > for appropriate configure option? > > Probably because it installs systemd file under /lib: > * QA Notice: package installs systemd unit files (/lib/systemd/system) > * but does not inherit systemd.eclass. > > but, since it relies on its own script to install, I guess will need to sed > the script a bit You should ask upstream to introduce an option. I see they have INIT_D_PATH so maybe they'll do something about it.
Fixed in 1.62