I am trying to create a daemon that is started automatically during the boot-up. It depends on the network, local fs and remote fs services. I believe I have done everything to indicate these dependencies and I expect the daemon to be started after the network daemons are up and running. But when I look into my logs I see that my daemon S1 is consistently starting before the network daemon is available.
The following is the init information in my S1.sh script located in /etc/init.d:
#!/bin/sh
### BEGIN INIT INFO
# Provides: My S1 Service
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start S1 Service
# Description: S1 Service
### END INIT INFO
#!/bin/sh
### BEGIN INIT INFO
# Provides: My S1 Service
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start S1 Service
# Description: S1 Service
### END INIT INFO
To copy to clipboard, switch view to plain text mode
And the following are my entries in the rc directories:
rc0.d:
K20S1_Service.sh -> ../init.d/S1.sh
rc1.d:
K20S1_Service.sh -> ../init.d/S1.sh
rc2.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc3.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc4.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc5.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc6.d:
K20S1_Service.sh -> ../init.d/S1.sh
rc0.d:
K20S1_Service.sh -> ../init.d/S1.sh
rc1.d:
K20S1_Service.sh -> ../init.d/S1.sh
rc2.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc3.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc4.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc5.d:
S98S1_Service.sh -> ../init.d/S1.sh
rc6.d:
K20S1_Service.sh -> ../init.d/S1.sh
To copy to clipboard, switch view to plain text mode
Is there anything more I have to do or am I doing anything wrong to make sure that my service/daemon is started after the network services/daemons are available?
I am reading up on upstart but I really like to know whats wrong with my current scipts and daemon startup.
Bookmarks