0

I'm triying to start the incron daemon "incrond" at boot but doesn't work.

I have done :

ln -s /usr/sbin/incrond /etc/init.d/incrond
chmod 755 /etc/init.d/incrond
update-rc.d incrond enable

But no "incrond" pid is running there.

Question
Shall I absolutely use /etc/init.d/skeleton as a starting point or is it still possible to symlink to the existing "incrond" daemon, and how then ?

Note:
I don't have "service name start" available on this Lenny distro.


EDIT : as a cook book, here is the way I solved it thx to the hints of the answers

# Update the discontinued Lenny sources list ("vim /etc/apt/sources.list")
# Reinstall incron ("aptitude reinstall incron"), maybe should also reinstall inotify-tools
# Create manually the famous missing start script ("vim /etc/init.d/incron" and, chmod 755 this file)
# Run the daemon at boot ("update-rc.d incron enable")
# Check start/stop args passed to the daemon ("/etc/init.d/incron restart" and then, "pidof incrond")
# Reboot and control again that the daemon incrond is running (use "pidof" or "ps -ef | grep incron" or "cat /var/run/incron.pid")

Note: I found a good basis for the start script here, but did not face this incrond timeout issue.

hornetbzz
  • 170
  • 9

3 Answers3

3
ln -s /usr/sbin/incrond /etc/init.d/incrond

It doesn't work like that. When the the system runs the various startups scripts for a run-level you it will pass it an arguments like start, stop, restart and so on. You can't just symlink to the daemon binary, since that binary will either fail, or not properly respond when passed those arguments.

You will almost certainly need to create a startup script. It doesn't have to be a copy of skeleton, but it must accept at least the start, stop, and restart arguments.

Zoredache
  • 133,737
1

No, it shouldn't be possible to do what you're doing. What's in /etc/init.d (and managed using update-rc.d) are specially formatted shell scripts that call the specified binaries. Just linking that binary into /etc/init.d isn't going to do anything useful.

How did you install incron? I don't run Debian, but the Ubuntu (Lucid) package for incron includes /etc/init.d/incron, which is the correct init script for the service. Yes, you can use /etc/init.d/skeleton as a starting point, but, really, there should have been an init script already in your package.

What does dpkg -L incron say?

cjc
  • 25,492
0

the debian incron package already provides an /etc/init.d/incron script, which should be enabled by default. You would normally just install the package and have it running.

Now that you've altered this file, and since it is a conffile, the package manager will not replace your version with the packaged version. I'd recommend removing your /etc/init.d/incron script then run

apt-get -o DPkg::Options::='--force-confmiss' reinstall incron

To force the package manager to replace the missing conffile.

stew
  • 9,588