Errors from init script are logged Resolves: #345611

This commit is contained in:
Zdenek Prikryl 2007-10-23 08:08:30 +00:00
parent 3e0d43dcfe
commit 76c0dde904
2 changed files with 12 additions and 8 deletions

View File

@ -30,18 +30,18 @@ RETVAL=0
start() { start() {
# Check if acpid is executable # Check if acpid is executable
if [ ! -x /usr/sbin/acpid ]; then if [ ! -x /usr/sbin/acpid ]; then
echo "$0: acpid is not executable." logger -p daemon.error -t $0 "/usr/sbin/acpid is not executable."
exit 1 exit 1
fi fi
# Check for kernel support # Check for kernel support
if [ ! -f /proc/acpi/event ]; then if [ ! -f /proc/acpi/event ]; then
echo "$0: need ACPI_PROC_EVENT support in kernel." //zmena podle 260181 logger -p daemon.error -t $0 "need ACPI_PROC_EVENT support in kernel."
exit 1 exit 1
fi fi
# Check if it is already running # Check if it is already running
if [ ! -f /var/lock/subsys/acpid ]; then if [ ! -f /var/lock/subsys/acpid ]; then
echo -n $"Starting acpi daemon: " echo -n $"Starting acpi daemon: "
daemon /usr/sbin/acpid daemon /usr/sbin/acpid $@
RETVAL=$? RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
echo echo
@ -61,7 +61,7 @@ stop() {
restart() { restart() {
stop stop
start start $@
} }
reload() { reload() {
@ -73,7 +73,7 @@ reload() {
case "$1" in case "$1" in
start) start)
start start $2
;; ;;
stop) stop)
stop stop
@ -86,11 +86,11 @@ force-reload)
RETVAL=3 RETVAL=3
;; ;;
restart) restart)
restart restart $2
;; ;;
condrestart) condrestart)
if [ -f /var/lock/subsys/acpid ]; then if [ -f /var/lock/subsys/acpid ]; then
restart restart $2
fi fi
;; ;;
status) status)

View File

@ -1,7 +1,7 @@
Summary: ACPI Event Daemon Summary: ACPI Event Daemon
Name: acpid Name: acpid
Version: 1.0.6 Version: 1.0.6
Release: 2%{?dist} Release: 3%{?dist}
License: GPL License: GPL
Group: System Environment/Daemons Group: System Environment/Daemons
Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz
@ -87,6 +87,10 @@ if [ "$1" -ge "1" ]; then
fi fi
%changelog %changelog
* Thu Oct 11 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-3.fc9
- Errors from init script are logged
- Resolves: #345611
* Wed Sep 26 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-2.fc8 * Wed Sep 26 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-2.fc8
- Fixed leak of a file descriptor - Fixed leak of a file descriptor
- Resolves: #304761 - Resolves: #304761