Click to See Complete Forum and Search --> : autorun shell command
655321
05-03-2001, 08:31 PM
how do i make a shell command that runs automatically every time i boot? i just got a cable modem, and i don't want to have to type the "dhcpcd -h cxxxx-x" thing every time i boot. running redhat 7.0.
Thanks,
Matt
655321
05-03-2001, 08:37 PM
shouldn't it work to just put the command in /etc/rc.local ?
655321
05-03-2001, 08:40 PM
also, is there a way to make it not try and get my eth0 to work at boot? it hangs for waaay too long and fails... thank you :D
Your eth0 is probably hanging due to the DHCP server or your nonexistant DHCP setup. Find a way to incorporate the DHCP script into your ifup script, so when IFCONFIG goes to add the address to the interface, it'll automatically probe DHCP and get the right IP info and thus eliminate delays. It could be, of course, the fact that your DHCP server is down or slow to respond.
655321
05-04-2001, 03:34 AM
yeah, i tried putting it (/sbin/dhcpcd -h cxxwhatever-x) in the ifup file, but i don't really know much about pearl, or whatever that is, so i had no idea where to put it. when i put it in the /etc/rc.local the network is loaded just fine, but it still hangs on eth0 during boot. is there any way to make it just not try and configure eth0 during boot? thanks everyone.
Malakin
05-04-2001, 05:16 AM
I'm not sure if this would be the same in RH7... but in my copy of Mandrake 8.0 if you look in "/etc/sysconfig/network-scripts/ifcfg-eth0" and change the line bootproto to "none" it will most likely fix your problem, I didn't actually test this but it would be logical :)
655321
05-04-2001, 09:53 AM
Originally posted by idealego:
<STRONG>I'm not sure if this would be the same in RH7... but in my copy of Mandrake 8.0 if you look in "/etc/sysconfig/network-scripts/ifcfg-eth0" and change the line bootproto to "none" it will most likely fix your problem, I didn't actually test this but it would be logical :)</STRONG>
Thanks, I'll give it a try and let you know if it works.
655321
05-04-2001, 04:23 PM
Alright, I got it to work! In ifcfg-eth0 I just changed the line "ONBOOT=yes" to "ONBOOT=no"
Thanks a lot everyone.