acpid: adopt port
This commit is contained in:
parent
8fbf26b2bf
commit
d4096c2854
16
acpid/.footprint
Normal file
16
acpid/.footprint
Normal file
@ -0,0 +1,16 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/acpi/
|
||||
-rwxr-xr-x root/root etc/acpi/default.sh
|
||||
drwxr-xr-x root/root etc/acpi/events/
|
||||
-rw-r--r-- root/root etc/acpi/events/default
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/acpid
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/acpi_listen
|
||||
drwxr-xr-x root/root usr/man/
|
||||
drwxr-xr-x root/root usr/man/man8/
|
||||
-rw-r--r-- root/root usr/man/man8/acpi_listen.8.gz
|
||||
-rw-r--r-- root/root usr/man/man8/acpid.8.gz
|
||||
drwxr-xr-x root/root usr/sbin/
|
||||
-rwxr-x--- root/root usr/sbin/acpid
|
4
acpid/.md5sum
Normal file
4
acpid/.md5sum
Normal file
@ -0,0 +1,4 @@
|
||||
3aff94e92186e99ed5fd6dcee2db7c74 acpid-1.0.4.tar.gz
|
||||
41e6969cfea8e28bdc44142e977c0aa5 acpid.rc
|
||||
a0d3f9a8480faf602a7415d03267f49f default
|
||||
270a4cddfe84c89c0fe534ece700d98b default.sh
|
23
acpid/Pkgfile
Normal file
23
acpid/Pkgfile
Normal file
@ -0,0 +1,23 @@
|
||||
# Description: Advanced Configuration and Power Interface event management daemon
|
||||
# URL: http://acpid.sf.net
|
||||
# Maintainer: sten, nick dot steeves at shaw dot ca
|
||||
# Packager: Markus Heinz, su1690 at studserver dot uni-dortmund dot de
|
||||
|
||||
name=acpid
|
||||
version=1.0.4
|
||||
release=1
|
||||
source=(http://dl.sourceforge.net/${name}/${name}-$version.tar.gz \
|
||||
acpid.rc default default.sh)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
mkdir -p $PKG/usr/{bin,sbin,man/man8}
|
||||
make INSTPREFIX=/usr
|
||||
make INSTPREFIX=$PKG MAN8DIR=$PKG/usr/man/man8 install
|
||||
mkdir -p $PKG/etc/{acpi/events,rc.d}
|
||||
mv ../acpid.rc $PKG/etc/rc.d/acpid
|
||||
mv ../default $PKG/etc/acpi/events
|
||||
mv ../default.sh $PKG/etc/acpi
|
||||
chmod 00755 $PKG/etc/rc.d/acpid $PKG/etc/acpi/default.sh
|
||||
chown -R root:root $PKG
|
||||
}
|
50
acpid/acpid.rc
Normal file
50
acpid/acpid.rc
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
######################################################################
|
||||
# acpid: starts/stops ACPI daemon
|
||||
######################################################################
|
||||
|
||||
daemon="/usr/sbin/acpid"
|
||||
options="-c /etc/acpi/events -l /var/log/acpid"
|
||||
|
||||
######################################################################
|
||||
# Start/Stop/Reload/Status Functions
|
||||
######################################################################
|
||||
start() {
|
||||
if [ -e /proc/acpi ]; then
|
||||
# call acpid with default config/logfiles
|
||||
$daemon $options
|
||||
return $?
|
||||
fi
|
||||
}
|
||||
stop() {
|
||||
pkill -o -x ${daemon##*/}
|
||||
return $?
|
||||
}
|
||||
reload() {
|
||||
pkill -HUP -o -x ${daemon##*/}
|
||||
return $?
|
||||
}
|
||||
status() {
|
||||
base=${daemon##*/}
|
||||
dpid=`pidof -o $$ -o $PPID -o %PPID -x ${base}`
|
||||
if [ "$dpid" != "" ]; then
|
||||
echo "${base} (pid $dpid) is running..."
|
||||
elif [ -s /var/run/${base}.pid ]; then
|
||||
echo "${base} is dead but pid file exists..."
|
||||
else
|
||||
echo "${base} is stopped."
|
||||
fi
|
||||
return
|
||||
}
|
||||
######################################################################
|
||||
# See how we were called
|
||||
######################################################################
|
||||
case "$1" in
|
||||
start) start ;;
|
||||
stop) stop ;;
|
||||
reload) reload ;;
|
||||
restart) stop;start ;;
|
||||
status) status ;;
|
||||
*) echo "Usage: $0 {start|stop|reload|restart|status}" ; exit 1
|
||||
esac
|
||||
exit $?
|
18
acpid/default
Normal file
18
acpid/default
Normal file
@ -0,0 +1,18 @@
|
||||
# This is the ACPID default configuration, it takes all
|
||||
# events and passes them to /etc/acpi/default.sh for further
|
||||
# processing.
|
||||
|
||||
# event keeps a regular expression matching the event. To get
|
||||
# power events only, just use something like "event=button power.*"
|
||||
# to catch it.
|
||||
# action keeps the command to be executed after an event occurs
|
||||
# In case of the power event above, your entry may look this way:
|
||||
#event=button power.*
|
||||
#action=/sbin/init 0
|
||||
|
||||
# Optionally you can specify the placeholder %e. It will pass
|
||||
# through the whole kernel event message to the program you've
|
||||
# specified.
|
||||
|
||||
event=.*
|
||||
action=/etc/acpi/default.sh %e
|
19
acpid/default.sh
Normal file
19
acpid/default.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Default acpi script that takes an entry for all actions
|
||||
|
||||
set $*
|
||||
|
||||
case "$1" in
|
||||
button/power)
|
||||
case "$2" in
|
||||
PWRF) /sbin/init 0
|
||||
;;
|
||||
*) logger "ACPI action $2 is not defined"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
logger "ACPI group $1 / action $2 is not defined"
|
||||
;;
|
||||
esac
|
Loading…
x
Reference in New Issue
Block a user