I have a custom initscript /etc/init.d/sshfs , which mounts and unmounts sshfs from my server.
I am having trouble getting it to run at the right place in the shutdown sequence. It used to work, but recently stopped working for no apparent reason. I have a symlink /etc/rc0.d/K01sshfs -> ../init.d/sshfs and it runs, but for whatever reason it runs after for example K03sendsigs -> ../init.d/sendsigs Which I think is what causes it to fail, because the fuse process has been killed by sendsigs. I though that perhaps the problem was that I should add a init header, so I added ### BEGIN INIT INFO # Provides: sshfs # Required-Start: $local_fs networking $named $network # Required-Stop: $local_fs networking $named $network # Default-Start: S # Default-Stop: 0 6 # X-Stop-After: thuebckup # Short-Description: sshfs # Description: mount /home/thue/sorteret, /home/thue/thuedata ### END INIT INFO But it did not help. I also tried adding postfix to the Required-Stop line, but "sshfs stop" is still run after postfix # Required-Stop: $local_fs networking $named $network postfix I can't find any relevant help in /etc/init.d/README or http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit . Can anybody on this list help me? Regards, Thue