Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have tried putting in my own IFCONFIG commands in /etc/rc.local to set up a static IP address on eth0. After boot I check it using the ifconfig cmd but it doen't appear to have worked.
I would like to write my own message from rc.local to make sure my part is getting executed but gprintf doesn't appear to do it.
After a lot of heartache I finally worked out that my D-Link D504T router is NOT populating the DNS of my eth0 device. I would also like to do this during boot but can't find what command to use. MAN IFCONFIG shows nothing? Currently I use the Mandrake Control Centre's Network & Internet Internet access to do this but don't know how to find what command IT uses.
if you can find out the ip address of your isps dns servers just put them in your /etc/resolv.conf
nameserver blah.balh.aasdf.sdff
if your with me....
errm.
auto setup. mandrake. hmm. i don't like mandrake because if abused me when i was young and linux innocent but i know the RH based distros keep their network config scripts in /etc/sysconfig/network-scripts/
the file i nthere you need to edit is called ifcfg-DEVICENAME ie ifcfg-eth0
have to put the DNS in every boot.
I'd like to know how to write to syslog when rc.local runs as I want to be sure that rc.local is working. If so then the commands I've put ibn there aren't working.
Thanks anyway, can you answer this for me please.
you shouldn't really be running network setup commands from rc.local. not sure where the network scripts on mandrake are.
don't know how to send stuff to the syslog
have you tried looking in some of the other logfiles to see if there are any messages
/var/log/
you shouldn't have to put the dns in every time unless something else is changing your resolv.conf
it should say at the top of your resolv.conf what has changed it. (maybe not in mandrake)
the D-link D504T / driver that changes it back. Whatever it is it means that I have to put it in over the top.
I read other posts that said to put things in rc.local. I only want the 3 ifconfigs I need
ifconfig eth0 down
ifconfig eth0 192.168.3.1
ifconfig up
but they don't seem to be executed as once I log-in I su & ifconfig only to find eth0 still has not been sorted.
I don't care really where they go so long as they get exexcuted.
After a boot
and i've su'd all the cmds work fine
only then does route -n show what i need and only then can i browse internet and local lan.
I will try exec on next boot
Hmmm! I thouht I had explained that silly ol' me had edited rc.local and lost the x-ecute bit. No wonder it wasn't working.
Sorry to waste eveyones time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.