I would like to run a script when pppd connects/disconnects. In Ubuntu, it is simple: I just add the script to /etc/ppp/ip-up.d and /etc/ppp/ip-down.d folders. In the koppel's mod of Oleg firmware, I just add the ip-up and ip-down scripts in /tmp/ppp folder.

But this does not work in 1.9.2.7-d-r1222. The ip-up and ip-down are symlinked to /sbin/rc. If I replace this ip-up with my ip-up, I get problems. It seems the builtin ip-up populates resolv.conf with the dns servers of my connection. I can get around this by hardcoding the dns servers. But I would rather not do it in this kludgy manner. Besides, I dont know what else does the /sbin/rc program do.

I have tried the Ubuntu way with ip-up.d folder, but it is ignored. I searched through the posts and found one which suggested adding the ip-up to /tmp/etc/ppp folder; but this does not work as the script is ignored.

Is there anyway to execute scripts on pppd connection/disconnection?

Thanks.