#!/usr/bin/execlineb -P
# Mirror debian/acpi-support.init start.
# Shell bridge required: power-funcs and /etc/acpi/start.d/*.sh are sourced
# (not executed), so they cannot be expressed in pure execline.

exec /bin/sh -c '
test -f /usr/share/acpi-support/power-funcs || exit 0
. /usr/share/acpi-support/power-funcs
test -d /var/lib/acpi-support || exit 0
on_ac_power
if [ $? -eq 1 ]; then
	/etc/acpi/power.sh true
fi
for SCRIPT in /etc/acpi/start.d/*.sh; do
	if [ -f "$SCRIPT" ]; then
		. "$SCRIPT"
	fi
done
exit 0
'
