View previous topic :: View next topic |
Author |
Message |
Jeorsch n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/16131603163f433eed7d6a0.gif)
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!!! ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
coondog n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/19085268293fd94c0878291.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
Jeorsch n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/16131603163f433eed7d6a0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
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 ![Cool 8)](images/smiles/icon_cool.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|