Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to change some configuration after a PPPoE connection has been established. (Change /etc/resolv.conf, add routes.)

I made a script, moved it to the /etc/ppp/ip-up.d/ and made it executable, but it looks like it doesn't run. If I run it manually everything works fine, but I want this process being automated.

So for now I have to run sudo pon provider, and sudo /etc/ppp/ip-up.d/provider.cfg.

How to fix it?

share|improve this question
To see if it actually runs, maybe temporarily add a debugging statement like touch /tmp/last-pppoe-connection to the script? – Arjan Sep 18 '10 at 6:43
My script doesn't run on pppoe connection, but others in ip-up.d folder are. Looks like they must be called from other script, but I don't know what one. ppp documentation doesn't covers this. – PocketSam Sep 22 '10 at 10:14
In /etc/ppp/ip-up there is code: run-parts /etc/ppp/ip-up.d --arg="$1" --arg="$2" --arg="$3" --arg="$4" --arg="$5" --arg="$6" I think that it calls scripts from /etc/ppp/ip-up.d/ folder. But my script doesn't run. – PocketSam Sep 22 '10 at 10:26
Don't know what has happend, but it works now. – PocketSam Sep 23 '10 at 3:11

The scripts are run with "run-parts" - see man page:

run-parts runs a number of scripts or programs found in a single directory directory.

Filenames should consist entirely of upper and lower case letters, digits, underscores, and hyphens.

Subdirectories of directory and files with other names will be silently ignored.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .