auto running commands on startup


Recommended Posts

i have mandrake 9, and have just finished configuring the internet, :D but, when ever i restart, shutdown and startup, the /etc/resolv.conf resets the dns servers to being my gateways ip (192.168.0.1) this prevents the net from working, and so i have to, when ever the computer boots, log into root, and change these settings, how would i make a file that changes, or, copies a correct version of resolv.conf into /etc at startup???

Link to comment
Share on other sites

add any commands you want to run on startup to the end of the

/etc/rc.d/rc file

I have a nasty feeling however that mandrake will have changed this in some way or another, if you have problems doing this ditch it in favor of a "good" distro

Link to comment
Share on other sites

There are two choices as I know:

1. Add the command to the end of /etc/rc.d/rc.local file to copy and overwrite the resolv.conf file. e.g. cp /etc/myresolv.conf /etc/resolv.conf (you may also need to use an option to prevent it from prompting to overwrite)

2. You setup a dhclient.conf file to supersede the resolver file. I can't remember off hand quite how to setup the file. Maybe type dhclient.conf into google or someone more experience than me may reply in the forum.

I have used option 2 before and it worked a treat.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.