View previous topic :: View next topic |
Author |
Message |
Jeorsch n00b


Joined: 19 Aug 2003 Posts: 18 Location: Aachen, Germany
|
Posted: Fri Dec 12, 2003 12:51 am Post subject: /etc/init.d/net.ethX suggestion |
|
|
Hi!
I am currently using a DDNS server on my network. When using the regular way for DHCP in Gentoo, setting in /etc/conf.d/net, I missed the dhcpcd to transfer my hostname, so it could be resolved by DNS.
Why not change the /etc/init.d/net.ethX this way by default (or does it hurt?!?):
Code: |
jeorsch@mopped2000 tmp $ diff -U 5 net.eth0.old net.eth0
--- net.eth0.old 2003-12-12 01:41:48.000000000 +0100
+++ net.eth0 2003-12-12 01:42:00.000000000 +0100
@@ -59,11 +59,11 @@
}
else
# Check that eth0 was not brough up by the kernel ...
if [ "${status_IFACE}" != "up" ]
then
- /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
+ /sbin/dhcpcd -h ${HOSTNAME} ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
retval=$?
eend ${retval} "Failed to bring ${IFACE} up"
return ${retval}
}
fi
|
MfG Jeorsch
Edit:
Just saw that there is a "t" missing in the word "brough", 3 lines before my suggestion... So I think it is really time to update the file!!!  |
|
Back to top |
|
 |
coondog n00b


Joined: 28 Sep 2003 Posts: 69 Location: Tallahassee, Florida
|
Posted: Fri Dec 12, 2003 5:04 am Post subject: |
|
|
What specific lines of code have you changed ?? Keep in mind it is always changing too ... when you emerge --update another version and then etc-update will replace your config files |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Dec 12, 2003 9:41 am Post subject: |
|
|
in /etc/net
Code: | dhcpcd_eth0="-h uberlaptop -D" |
Isn't that what you're looking for? |
|
Back to top |
|
 |
Jeorsch n00b


Joined: 19 Aug 2003 Posts: 18 Location: Aachen, Germany
|
Posted: Fri Dec 12, 2003 1:26 pm Post subject: |
|
|
Ooops!
Just missed that line...
But I missed another thing, too. The dhcpcd times out after 60 seconds by default when no connection was established. I think it would be better to run it all the time and fork it into background. I am currently using a notebook and it would be nice if it chats with the DHCP-Server just when I plug in the cable... But how to do that? I found nothing in 'man dhcpcd' but the '-t' option. '-t 0' does not work and '-t <a_very_long_time>' would be a quite ugly hack.
MfG Jeorsch |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Dec 12, 2003 1:28 pm Post subject: |
|
|
Sounds like you need to look into the package ifplugd
It does pcmcia stylie stuff to hardwired ethernet  |
|
Back to top |
|
 |
|