Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/init.d/net.ethX suggestion
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jeorsch
n00b
n00b


Joined: 19 Aug 2003
Posts: 18
Location: Aachen, Germany

PostPosted: Fri Dec 12, 2003 12:51 am    Post subject: /etc/init.d/net.ethX suggestion Reply with quote

Hi!

I am currently using a DDNS server on my network. When using the regular way for DHCP in Gentoo, setting
Code:
iface_ethX="dhcp"
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
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Fri Dec 12, 2003 5:04 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Dec 12, 2003 9:41 am    Post subject: Reply with quote

in /etc/net
Code:
dhcpcd_eth0="-h uberlaptop -D"


Isn't that what you're looking for?
Back to top
View user's profile Send private message
Jeorsch
n00b
n00b


Joined: 19 Aug 2003
Posts: 18
Location: Aachen, Germany

PostPosted: Fri Dec 12, 2003 1:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Dec 12, 2003 1:28 pm    Post subject: Reply with quote

Sounds like you need to look into the package ifplugd

It does pcmcia stylie stuff to hardwired ethernet 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum