I have a script on the PI to shutdown my NAS "shutdown_nas.sh". I have created that script in /etc/init.d according to the instructions in /etc/init.d/README
It is symlinked in /etc/rc0.d/K01NAS_shutdown.sh
It works fine when I call:
sudo service shutdown_nas.sh stop
It also works fine when I halt the PI when I'm on ethernet (eth0).
It doesn't work on WIFI only, it seems like wlan is down before the needed request is done.
/etc/rc2.d/K01NAS_shutdown.sh
, or/etc/rc3.d/K01NAS_shutdown.sh
K01...
the first file in the rc2.d directory? Is there aK00..
that messes thins up?