From 4696aac2d3cdfd88fcd042b2b08e8b31898d5da9 Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Thu, 4 Aug 2011 18:01:50 +0000 Subject: Improve init.d script more for baselayout-2. (Portage version: 2.2.0_alpha47/cvs/Linux x86_64) --- sys-power/acpid/ChangeLog | 4 ++-- sys-power/acpid/files/acpid-2.0.11-init.d | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) (limited to 'sys-power/acpid') diff --git a/sys-power/acpid/ChangeLog b/sys-power/acpid/ChangeLog index 228899cb881b..989ca02ce732 100644 --- a/sys-power/acpid/ChangeLog +++ b/sys-power/acpid/ChangeLog @@ -1,10 +1,10 @@ # ChangeLog for sys-power/acpid # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.69 2011/08/04 17:30:01 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.70 2011/08/04 18:01:50 ssuominen Exp $ 04 Aug 2011; Samuli Suominen files/acpid-2.0.11-init.d: - Rename opts="reload" as extra_commands="reload" for baselayout-2. + Improve init.d script more for baselayout-2. 04 Aug 2011; Samuli Suominen -acpid-2.0.6.ebuild, -acpid-2.0.10.ebuild: diff --git a/sys-power/acpid/files/acpid-2.0.11-init.d b/sys-power/acpid/files/acpid-2.0.11-init.d index 867e77a302a9..2fc73e353950 100644 --- a/sys-power/acpid/files/acpid-2.0.11-init.d +++ b/sys-power/acpid/files/acpid-2.0.11-init.d @@ -1,29 +1,27 @@ #!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.11-init.d,v 1.3 2011/08/04 17:30:01 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.11-init.d,v 1.4 2011/08/04 18:01:50 ssuominen Exp $ extra_commands="reload" +command="/usr/sbin/acpid" +command_args="${ACPID_OPTIONS}" +start_stop_daemon_args="--quiet" +description="Daemon for Advanced Configuration and Power Interface" depend() { + if [ ! -f /etc/init.d/sysfs ]; then + eerror "The $SVCNAME init-script is written for baselayout-2!" + eerror "Please do not use it with baselayout-1!". + return 1 + fi + need localmount use logger } -start() { - ebegin "Starting acpid" - start-stop-daemon --start --quiet --exec /usr/sbin/acpid -- ${ACPID_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping acpid" - start-stop-daemon --stop --exec /usr/sbin/acpid - eend $? -} - reload() { ebegin "Reloading acpid configuration" - start-stop-daemon --exec /usr/sbin/acpid --signal HUP + start-stop-daemon --exec $command --signal HUP eend $? } -- cgit v1.2.3-65-gdbad