Created attachment 899929 [details] emerge --info The drop-in /etc/systemd/system/hd-idle.service.d/00gentoo.conf is not used. systemctl status hd-idle shows the process /usr/sbin/hd-idle -i 180 -l /var/log/hd-idle.log If we want to override this using /etc/systemd/system/hd-idle.service.d/00gentoo.conf, eg. ExecStart=/usr/sbin/hd-idle -i 180 and restart it systemctl daemon-reload systemctl restart hd-idle we still see the process /usr/sbin/hd-idle -i 180 -l /var/log/hd-idle.log
Many thanks for the report! Not sure how that escaped my testing earlier. an you confirm that using the lines: ExecStart= ExecStart=/usr/sbin/hd-idle -i 180 in the override file /etc/systemd/system/hd-idle.service.d/00gentoo.conf instead of just the second line works as exepcted?
Another addendum: It must be: [Service] ExecStart= ExecStart=/usr/sbin/hd-idle -i 180 If that works for you as expected, I'll update the example later on to include the section, both lines, and a note on how to use them. Sorry for the missing lines!
(In reply to Oliver Freyermuth from comment #2) > Another addendum: It must be: > > [Service] > ExecStart= > ExecStart=/usr/sbin/hd-idle -i 180 > I've got it. You are right, but you have to use hd-idle.service.d, not hd-idle-dropin.d I have now: hd-idle.service.d/00gentoo.conf containing [Service] ExecStart= ExecStart=/usr/sbin/hd-idle -i 30 systemctl cat hd-idle tells me now correctly # /usr/lib/systemd/system/hd-idle.service # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 [Unit] Description=hd-idle - spinning down HDDs after a period of idle time Documentation=man:hd-idle(1) [Service] Type=forking ExecStart=/usr/sbin/hd-idle -i 180 -l /var/log/hd-idle.log [Install] WantedBy=multi-user.target # /etc/systemd/system/hd-idle.service.d/00gentoo.conf [Service] ExecStart= ExecStart=/usr/sbin/hd-idle -i 30
Thanks for confirming. Yes, indeed, the path must be /etc/systemd/system/hd-idle.service.d/00gentoo.conf (the package already uses that). I have submitted a PR to update the drop in config file to contain the necessary lines and more targeted usage instructions as version sys-apps/hd-idle-1.05-r3, as soon as this is merged and in-tree for a while, I will also trigger stabilization of the revbumped version. Thanks again for the report!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7b5339f5bc2a2fce20ef5ec50744706e92bb08f commit e7b5339f5bc2a2fce20ef5ec50744706e92bb08f Author: Oliver Freyermuth <o.freyermuth@googlemail.com> AuthorDate: 2024-08-13 10:27:28 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-08-28 06:52:59 +0000 sys-apps/hd-idle: fix and clarify systemd dropin example file Closes: https://bugs.gentoo.org/937799 Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com> Closes: https://github.com/gentoo/gentoo/pull/38130 Signed-off-by: Joonas Niilola <juippis@gentoo.org> sys-apps/hd-idle/files/hd-idle-service-dropin.conf | 35 ++++++++++++++++++++++ sys-apps/hd-idle/hd-idle-1.05-r3.ebuild | 33 ++++++++++++++++++++ 2 files changed, 68 insertions(+)
I'm sorry to inform you about this issue which is not completely fixed. The content of the override file "00gentoo.conf" is correct, but the path /etc/systemd/system/hd-idle-service-dropin.d/00gentoo.conf must be /etc/systemd/system/hd-idle.service.d/00gentoo.conf
That doesn't make it invalid, it means it should be reopened.
(In reply to Sam James from comment #7) > That doesn't make it invalid, it means it should be reopened. OK, sorry. Next time I'll do it right.
Thanks for the follow-up report. I'm sorry I missed the details of how systemd_install_serviced chooses the path before. The path will be fixed by https://github.com/gentoo/gentoo/pull/38522 .
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f32a2550ebe5f5affdd2db5c80b06ccb8f55f411 commit f32a2550ebe5f5affdd2db5c80b06ccb8f55f411 Author: Oliver Freyermuth <o.freyermuth@googlemail.com> AuthorDate: 2024-09-08 12:28:34 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-09-14 09:53:48 +0000 sys-apps/hd-idle: fix systemd dropin file install location Closes: https://bugs.gentoo.org/937799 Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com> Closes: https://github.com/gentoo/gentoo/pull/38522 Signed-off-by: Florian Schmaus <flow@gentoo.org> sys-apps/hd-idle/hd-idle-1.05-r4.ebuild | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)