View previous topic :: View next topic |
Author |
Message |
pdl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/65012807476a1d46129dc.jpg)
Joined: 06 Apr 2006 Posts: 42
|
Posted: Wed Dec 17, 2008 12:15 am Post subject: config_eth0=( "noop" ) ignored when thin client bo |
|
|
I have a thin client that boots over NFS. It starts well, with the kernel connecting to interface eth0, getting an IP address from a nearby DHCP server, and progressing quite far along the boot process. It proceeds all the way into the runlevel "boot", gets through /etc/init.d/net.lo just fine, and then starts the script /etc/init.d/net.eth0. There's trouble here. Since interface eth0 is already up and running, I want that script to do nothing. So I have just one line in the file /etc/conf.d/net, and that line is Code: | config_eth0=( "noop" ) | Unfortunately, it seems that my wishes (instructions?) are not getting through to the script. Extra verbose printing reveals that net.eth0 thinks the config variable is set to the string "dhcp". Hence it tries to do something with eth0, and this brings everything grinding to a halt.
At the moment I work around this behaviour by customizing the script net.eth0 to behave like config=="noop" even though this isn't true, but I would much rather have my little Gentoo client set up and working in a more conventional way. Suggestions, please?
Notes: 1. Deleting the net.eth0 from runlevel "boot" does not solve the problem. Something automatic (udev, I think) decides for me that net.eth0 is going to be needed, and schedules it to get run anyway. 2. To get extra insight into the way the script works, I edited the file /etc/conf.d/rc so that it included the line RC_VERBOSE="yes" (that setting defaults to "no"). That's how I know what modules get loaded when net.eth0 is run, and what the script thinks the config variable is set to.
I'm not sure what to offer by way of techno-detail. Here's some.
Code: | chuck ~ # uname -a
Linux chuck 2.6.25-gentoo-r7 #6 Mon Aug 4 08:23:29 PDT 2008 i586 Geode(TM) Integrated Processor by National Semi Geode by NSC GNU/Linux
chuck ~ # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:64:18:75:02
inet addr:192.168.2.144 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:189969 errors:0 dropped:332 overruns:0 frame:0
TX packets:163093 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:102684555 (97.9 MiB) TX bytes:30794468 (29.3 MiB)
Interrupt:10 Base address:0x8000
|
Last edited by pdl on Fri Jan 16, 2009 8:58 pm; edited 3 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Wed Dec 17, 2008 12:18 am Post subject: Re: config_eth0( "noop" ) ignored when thin client |
|
|
pdl wrote: | I have a thin client that boots over NFS. It starts well, with the kernel connecting to interface eth0, getting an IP address from a nearby DHCP server, and progressing quite far along the boot process. It proceeds all the way into the runlevel "boot", gets through /etc/init.d/net.lo just fine, and then starts the script /etc/init.d/net.eth0. There's trouble here. Since interface eth0 is already up and running, I want that script to do nothing. So I have just one line in the file /etc/conf.d/net, and that line is Code: | config_eth0( "noop" ) | Unfortunately, it seems that my wishes (instructions?) are not getting through to the script. Extra verbose printing reveals that net.eth0 thinks the config variable is set to the string "dhcp". Hence it tries to do something with eth0, and this brings everything grinding to a halt.
At the moment I work around this behaviour by customizing the script net.eth0 to behave like config=="noop" even though this isn't true, but I would much rather have my little Gentoo client set up and working in a more conventional way. Suggestions, please?
Notes: 1. Deleting the net.eth0 from runlevel "boot" does not solve the problem. Something automatic (udev, I think) decides for me that net.eth0 is going to be needed, and schedules it to get run anyway. 2. To get extra insight into the way the script works, I edited the file /etc/conf.d/rc so that it included the line RC_VERBOSE="yes" (that setting defaults to "no"). That's how I know what modules get loaded when net.eth0 is run, and what the script thinks the config variable is set to.
I'm not sure what to offer by way of techno-detail. Here's some.
Code: | chuck ~ # uname -a
Linux chuck 2.6.25-gentoo-r7 #6 Mon Aug 4 08:23:29 PDT 2008 i586 Geode(TM) Integrated Processor by National Semi Geode by NSC GNU/Linux
chuck ~ # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:64:18:75:02
inet addr:192.168.2.144 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:189969 errors:0 dropped:332 overruns:0 frame:0
TX packets:163093 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:102684555 (97.9 MiB) TX bytes:30794468 (29.3 MiB)
Interrupt:10 Base address:0x8000
|
|
Tell udev not to start network services, in addition to deleting from runlevel
in /etc/conf.d/rc
RC_PLUG_SERVICES="!net.*"
(or specifically "!net.eth0", or any sevices "!*" ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pdl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/65012807476a1d46129dc.jpg)
Joined: 06 Apr 2006 Posts: 42
|
Posted: Wed Dec 17, 2008 5:26 am Post subject: |
|
|
Thanks, dmpogo. Combining (1) deletion of net.eth0 from runlevel "boot" with (2) explicit interdiction of net.eth0 in /etc/conf.d/rc works for me. I like this approach better than my hand-tuned initscript. Nonetheless, I'll refrain from marking the thread "solved" for a little longer. I'm hoping that some might be able to offer a hypothesis about why the contents of /etc/conf.d/net seem to be irrelevant when, IMHO, they should be getting consulted. (Or, nearly as good, where *else* the script net.eth0 might be picking up its definition of the "config" bash variable.) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Wed Dec 17, 2008 5:58 am Post subject: |
|
|
pdl wrote: | Thanks, dmpogo. Combining (1) deletion of net.eth0 from runlevel "boot" with (2) explicit interdiction of net.eth0 in /etc/conf.d/rc works for me. I like this approach better than my hand-tuned initscript. Nonetheless, I'll refrain from marking the thread "solved" for a little longer. I'm hoping that some might be able to offer a hypothesis about why the contents of /etc/conf.d/net seem to be irrelevant when, IMHO, they should be getting consulted. (Or, nearly as good, where *else* the script net.eth0 might be picking up its definition of the "config" bash variable.) |
I don't know if it matters, but your original line has syntax error. It should read
Code: |
config_eth0=( "noop" )
|
with equal sign |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pdl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/65012807476a1d46129dc.jpg)
Joined: 06 Apr 2006 Posts: 42
|
Posted: Wed Dec 17, 2008 7:54 am Post subject: |
|
|
I'm sure it matters a lot, but the error was only in my post and not on my system. I'll edit the original post to give others an accurate view of the situation. Thanks for your careful reading. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Wed Dec 17, 2008 8:32 am Post subject: |
|
|
pdl wrote: | I'm sure it matters a lot, but the error was only in my post and not on my system. I'll edit the original post to give others an accurate view of the situation. Thanks for your careful reading. |
I was suspecting that it is the post only BTW, the error is still in the subject line |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pdl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/65012807476a1d46129dc.jpg)
Joined: 06 Apr 2006 Posts: 42
|
Posted: Wed Dec 17, 2008 3:13 pm Post subject: |
|
|
dmpogo wrote: | BTW, the error is still in the subject line |
Not any more. Thanks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|