#!/usr/bin/execlineb -P

envfile /etc/s6-rc/config/acpi-fakekey.conf
importas -sCuD "-f" Args Args

# OpenRC start_pre: ensure uinput is present
foreground {
	ifelse { test -d /sys/devices/virtual/misc/uinput } { exit 0 }
	if { modprobe -q uinput }
}

fdmove -c 2 1
exec /usr/sbin/acpi_fakekeyd ${Args}
