SlackwareThis Forum is for the discussion of Slackware Linux.
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.
For some odd reason, dhcpcd won't start up automatically anymore. This computer is being used as a server, and I set it up at my house and dhcp started just fine. But, when I set it up where I'm keeping it, I noticed that it wasn't starting on its own. I tried adding a line in rc.local with the command to start eth0(/sbin/dhcpcd eth0), but it seems like it would only try for about 2 seconds or so and then the login prompt would come up. When I start it manually it takes a little while to get the ip address. If this was my desktop computer I wouldn't mind, but since this is being used as a server, and also doesn't have a keyboard, mouse, and monitor hooked up to it, I would like to figure out a way to fix this in cause I have to resart or the power goes out. Any help would be appreciated.
dhcpcd should be starting from /etc/rc.d/rc.inet1, so take a look in there, and also make sure that file has execute privileges (if not then run /bin/chmod 755 /etc/rc.d/rc.inet1).
Check the configuration file. In /etc/rc.d/rc.inet1.conf, you should have a section that looks like this:
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
On that note... shouldn't a server have a static IP so you can forward packets from your gateway/router?
I use a little script which I run in cron every 5 minutes. Here it is:
Code:
#!/bin/sh
#
# dhcp-check - checks status of dhcp client
# in this case dhcpcd with a pid in /etc/dhcpc
# and restarts it when it is not running
#
if [ -f /etc/dhcpc/dhcpcd-eth0.pid ]; then
echo DHCP client is running already...
else
/sbin/dhcpcd -t 30 -d eth0 && /etc/rc.d/rc.firewall restart
fi
Note: this one is for eth0, if you use another external device please adjust every instance of eth0 to the device you're using. The -t 30 is an extended period for timing out on dhcp response. Slackware uses default 10 (secs) . I restart my firewall script after successfully (re)starting the dhcpcd daemon. If you do not want that you can leave it out ( delete the && /etc/rc.d/rc.firewall restart part)
Thanks rotvogel I didn't even thinking about making a script to run in cron.
philipacamaniac:
Everything in the rc.inet1 and rc.inet1.conf file are fine. As I said, it worked before I turned it off and brought it over to my gf's to set it up. And this server isn't behind a router/gateway, it's on a school network, so it's directly connected to the internet.
I've the same kind of problem.. but i dont know why.. before I add module to my 2.6.10 kernel, it's worked fine...
now when i boot in Slackware10 (current) dhcpcd is started (when i do a ps -aux) but i dont get any IP from my dhcp server. i must manualy do a /etc/rc.d/rc.inet1 stop and /etc/rc.d/rc.inet1 start
after it's work fine...
Anyone have an idead what i can do to fix it.. (if possible not a script... ) thanks !
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.