I created a simple script
-rwxr-xr-x 1 root root 51 Jan 30 11:46 /etc/init.d/before-shutdown
Then did a link so that I had
lrwxrwxrwx 1 root root 25 Jan 30 11:47 K04before-shutdown -> ../init.d/before-shutdown
Nothing happened!! So I wasted a lot of time reading up on systemd etc., and set up unit files to execute before shutdown.target, network.target, power off.target, as well as halt.target. Since these did not work either and life is too short, I went back to what I thought was the old way of doing things and did a
lrwxrwxrwx 1 root root 25 Feb 4 11:58 /etc/rc6.d/K99before-shutdown -> ../init.d/before-shutdown
This was a complete fail as well.
Would really appreciate any suggestions on how to make this work.
Thanks very much,
Vijay
Vijay Sankar
ForeTell Technologies Limited
vsankar@foretell.ca