I use Mageia ver 4 Linux as server, without X started and without any user login-in during normal operation. This PC has a special card for measuring and control of other devices. This card has its own SH4 Linux on-board, and needs to be shutdown first, before PC shutdown.
There is a set of commands supplied by the card vendor and they works properly. To shutdown the card it is necessary to execute
/usr/sbin/io_card stop, wait for proper card shutdown and then execute "ordinary" PC shutdown.
I wrote a special shutdown script and it works properly. But the problem is when I press "Power" button on PC, it executes "ordinary" PC shutdown instead of my script.
I try to change /etc/acpi/events/power and systemd scripts to include my own shutdown script, but it does not work. At this moment /etc/acpi/events/power file contains only entry :
where "shut" is my shutdown script, working good when running manually. So how can I change default power-off action associated with depressing "Power" button?