commit:     f210149eaacd6e727606a316c0b5c864f4e9e6c8
Author:     Stephen Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 22:47:46 2019 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Sat Jul 27 22:47:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f210149e

app-admin/hddtemp: simplify and correct baseline init script

* some environments (eg, musl hardened) do not work properly with the
  pidfile arg, so fall back to procname for correct rc-status

Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 app-admin/hddtemp/files/hddtemp-init            | 22 ----------------------
 app-admin/hddtemp/files/hddtemp-init-r1         | 11 +++++++++++
 app-admin/hddtemp/hddtemp-0.3_beta15-r28.ebuild |  2 +-
 3 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/app-admin/hddtemp/files/hddtemp-init 
b/app-admin/hddtemp/files/hddtemp-init
deleted file mode 100644
index 39a640997cf..00000000000
--- a/app-admin/hddtemp/files/hddtemp-init
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-       need localmount
-}
-
-start() {
-       ebegin "Starting hddtemp daemon"
-       /sbin/start-stop-daemon --start --quiet --exec ${HDDTEMP_EXEC} \
-       -- -d ${HDDTEMP_OPTS} ${HDDTEMP_DRIVES}
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping hddtemp daemon"
-       start-stop-daemon --stop --quiet --exec ${HDDTEMP_EXEC}
-       eend $?
-}
-
-

diff --git a/app-admin/hddtemp/files/hddtemp-init-r1 
b/app-admin/hddtemp/files/hddtemp-init-r1
new file mode 100644
index 00000000000..00d09ac2c61
--- /dev/null
+++ b/app-admin/hddtemp/files/hddtemp-init-r1
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="${HDDTEMP_EXEC}"
+command_args="-d ${HDDTEMP_OPTS} ${HDDTEMP_DRIVES}"
+procname="hddtemp"
+
+depend() {
+       need localmount
+}

diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r28.ebuild 
b/app-admin/hddtemp/hddtemp-0.3_beta15-r28.ebuild
index c1ffdee13a6..293c78379ca 100644
--- a/app-admin/hddtemp/hddtemp-0.3_beta15-r28.ebuild
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r28.ebuild
@@ -70,7 +70,7 @@ src_install() {
 
        update_db "${ED}/usr/share/hddtemp/hddgentoo.db" 
"${ED}/usr/share/hddtemp/hddtemp.db"
        newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp
-       newinitd "${FILESDIR}"/hddtemp-init hddtemp
+       newinitd "${FILESDIR}"/hddtemp-init-r1 hddtemp
        systemd_newunit "${FILESDIR}"/hddtemp.service-r1 "${PN}.service"
        systemd_install_serviced "${FILESDIR}"/hddtemp.service.conf
 

Reply via email to