Posted on 05-18-2008 under linux

Following on my previous two posts on No-IP, I finally figured out what was wrong with my system. In particular, even though the init scripts were installed, noip would not start at boot up. I had to manually run noip2 to start it up every time I rebooted.

The init scripts themselves were probably installed due to the debian package. I had earlier (naively) indicated that the init script would be installed by simply copying it to /etc/init.d/. This however is wrong and at the very least you would need to run update-rc.d to install it completely. A detailed description of init scripts under Debian can be read here.

I’m not sure if this was a problem with the debian package, but the script did not exist in /etc/rc2.d/. If you know anything about runlevels, you would know this is the runlevel in which debian enters after all initializations are complete to log the user in. I got wind of this when I did a find under the rc?.d directories

$ find /etc/rc*/ -name *noip*

which gave me

/etc/rc0.d/K20noip2
/etc/rc1.d/K20noip2
/etc/rc3.d/S20noip2
/etc/rc4.d/S20noip2
/etc/rc5.d/S20noip2
/etc/rc6.d/K20noip2

As you can see, rc2.d is missing. Sure enough adding a link in rc2.d fixed the problem.

Looking at the links in the other rc* directories, I found the name for the link I was about to create.

$ ls -l /etc/rc3.d/ | grep noip
lrwxrwxrwx 1 root root  15 2008-04-10 22:46 S20noip2 -> ../init.d/noip2

so,

# ln -s /etc/init.d/noip2 /etc/rc2.d/S20noip2

A quick reboot (ughh!) and a check

$ ps -A | grep noip
4108 ?        00:00:00 noip2

shows noip merrily buzzing away.

That was certainly a relief. I wasn’t looking forward to sludging through arcane scripting syntax, and obscure manuals.

Who am I kidding. I would’ve loved doing that :D