I wrote a daemon which watches for files in certain directory and if a new file is copied to this directory, then it is committed to SVN. New files appear in this directory only if remote devices copy files there over scp. Now I would like to create a System-V init script for this daemon in OpenSUSE 11.4. It's clear that Required-Start: line should contain only the $sshd boot facility as this ensures that local file-system is mounted, networking is operational and sshd is started. Those three boot facilities are prerequisites for the daemon, i.e. there is no point to start the daemon if sshd is not operational and thus it is impossible that it receives new files over scp. However, I'm bit puzzled how should I configure the Required-Stop: line, which lists any boot facilities which should NOT be stopped before shutting down the daemon. It looks logical to me to have local file systems mounted and networking operational(for uploading the files to SVN) while sshd is stopped(for not receiving any new files) before the daemon is stopped. Required-Stop: $sshd could create a situation where daemon is stopped while a new file is received over scp before the sshd is stopped.
So in a nutshell, following approach seems to be most logical to me:
# Required-Start: $sshd
# Required-Stop: $local_fs $network
Am I correct?