From 48ca75555522716f0f686dcae3dd6cf3d8ad714d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 31 May 2022 11:05:19 +0100 Subject: removed idea of repos --- repo/system/acpid/acpid.confd | 7 ------- repo/system/acpid/acpid.initd | 28 ---------------------------- repo/system/acpid/acpid.xibuild | 37 ------------------------------------- repo/system/acpid/anything | 3 --- repo/system/acpid/handler.sh | 36 ------------------------------------ repo/system/acpid/lid-closed | 21 --------------------- repo/system/acpid/power-supply-ac | 25 ------------------------- 7 files changed, 157 deletions(-) delete mode 100644 repo/system/acpid/acpid.confd delete mode 100644 repo/system/acpid/acpid.initd delete mode 100644 repo/system/acpid/acpid.xibuild delete mode 100644 repo/system/acpid/anything delete mode 100644 repo/system/acpid/handler.sh delete mode 100644 repo/system/acpid/lid-closed delete mode 100644 repo/system/acpid/power-supply-ac (limited to 'repo/system/acpid') diff --git a/repo/system/acpid/acpid.confd b/repo/system/acpid/acpid.confd deleted file mode 100644 index 2b3d304..0000000 --- a/repo/system/acpid/acpid.confd +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration file for /etc/init.d/acpid (from acpid package) - -# Additional arguments to pass to acpid. -command_args="--logevents" - -# Uncomment to use process supervisor. -#supervisor="supervise-daemon" diff --git a/repo/system/acpid/acpid.initd b/repo/system/acpid/acpid.initd deleted file mode 100644 index c2d60f9..0000000 --- a/repo/system/acpid/acpid.initd +++ /dev/null @@ -1,28 +0,0 @@ -#!/sbin/openrc-run - -description="The ACPI Daemon" - -extra_started_commands="reload" -description_reload="Reload configuration" - -command="/sbin/acpid" -command_args="--foreground ${command_args:-}" -command_background="yes" -pidfile="/run/$RC_SVCNAME.pid" - -depend() { - need dev localmount - after hwdrivers modules - provide acpid - keyword -vserver -lxc -} - -reload() { - ebegin "Reloading $RC_SVCNAME configuration" - if [ "$supervisor" ]; then - $supervisor "$RC_SVCNAME" --signal HUP - else - start-stop-daemon --pidfile "$pidfile" --signal HUP - fi - eend $? -} diff --git a/repo/system/acpid/acpid.xibuild b/repo/system/acpid/acpid.xibuild deleted file mode 100644 index f960ac0..0000000 --- a/repo/system/acpid/acpid.xibuild +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -MAKEDEPS="make" -DEPS="musl" - -PKG_VER=2.0.33 -SOURCE=https://downloads.sourceforge.net/acpid2/acpid-$PKG_VER.tar.xz -DESC="Daemon for battery, power, and thermal readings" - -ADDITIONAL=" - acpid.confd - acpid.initd - anything - handler.sh - lid-closed - power-supply-ac -" -build () { - ./configure --prefix=/usr \ - --docdir=/usr/share/doc/acpid-$PKG_VER && - make -} - -package () { - make DESTDIR=$PKG_DEST install - install -m755 -d $PKG_DEST/etc/acpi/events && - cp -r samples $PKG_DEST/usr/share/doc/acpid-$PKG_VER - - install -D -m 755 handler.sh etc/acpi/handler.sh - install -D -m 644 anything etc/acpi/events/anything - install -D -m 755 power-supply-ac usr/share/acpid/ - install -D -m 755 lid-closed usr/share/acpid/ - - install -D -m 755 acpid.initd etc/init.d/acpid - install -D -m 644 acpid.confd etc/conf.d/acpid - -} diff --git a/repo/system/acpid/anything b/repo/system/acpid/anything deleted file mode 100644 index d182898..0000000 --- a/repo/system/acpid/anything +++ /dev/null @@ -1,3 +0,0 @@ -# Pass all events to our one handler script -event=.* -action=/etc/acpi/handler.sh %e diff --git a/repo/system/acpid/handler.sh b/repo/system/acpid/handler.sh deleted file mode 100644 index 412ac02..0000000 --- a/repo/system/acpid/handler.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# vim: set ts=4: -# -# This is the default ACPI handler script that is configured in -# /etc/acpi/events/anything to be called for every ACPI event. -# You can edit it and add your own actions; treat it as a configuration file. -# -PATH="/usr/share/acpid:$PATH" -alias log='logger -t acpid' - -# ::: -case "$1:$2:$3:$4" in - -button/power:PWRF:*) - log 'Power button pressed' - # Shutdown the system unless it has a lid (notebook). - [ -e /proc/acpi/button/lid/LID ] || poweroff -;; -button/sleep:SLPB:*) - log 'Sleep button pressed' - # Suspend to RAM. - zzz -;; -button/lid:*:close:*) - log 'Lid closed' - # Suspend to RAM if AC adapter is not connected. - power-supply-ac || zzz -;; -ac_adapter:*:*:*0) - log 'AC adapter unplugged' - # Suspend to RAM if notebook's lid is closed. - lid-closed && zzz -;; -esac - -exit 0 diff --git a/repo/system/acpid/lid-closed b/repo/system/acpid/lid-closed deleted file mode 100644 index 57ffb71..0000000 --- a/repo/system/acpid/lid-closed +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# This script exits with status 0 if the latop's lid is closed, 1 if opened, -# 10 if /proc/acpi/button/lid/LID/state does not exist or is not readable. -set -u - -STATE_FILE='/proc/acpi/button/lid/LID/state' - -verbose=false -[ "${1:-}" = '-v' ] && verbose=true - -if ! [ -r "$STATE_FILE" ]; then - $verbose && echo "$STATE_FILE does not exist or is not readable!" >&2 - exit 10 -fi - -read -r _ state < "$STATE_FILE" || exit 10 - -[ "$state" = 'closed' ]; rc=$? - -$verbose && echo $rc -exit $rc diff --git a/repo/system/acpid/power-supply-ac b/repo/system/acpid/power-supply-ac deleted file mode 100644 index 337aae2..0000000 --- a/repo/system/acpid/power-supply-ac +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# This script exits with status 0 when the computer is on AC power (or no AC -# power supply found), 1 otherwise (i.e. running on battery). -set -u - -verbose=false -[ "${1:-}" = '-v' ] && verbose=true - -# If we do not have any power supplies, assume we are on AC. -rc=0 - -# Iterate through power supplies sysfs knows about. -for ps in /sys/class/power_supply/*; do - [ -r $ps/online ] || continue - # We know we have an AC adaptor, our default return changes to failed. - rc=1 - - if [ "$(cat $ps/online)" -eq 1 ]; then - rc=0 - break - fi -done - -$verbose && echo $rc -exit $rc -- cgit v1.2.1