Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Note on Advanced Configuration - Gentoo Handbook
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
salmonix
Guru
Guru


Joined: 16 Jul 2006
Posts: 410

PostPosted: Sun Jun 08, 2008 2:17 pm    Post subject: Note on Advanced Configuration - Gentoo Handbook Reply with quote

In the Gentoo Handbook http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2 the code listing of 2.1 on defining dependencies of an interface in /etc/conf.d/net file is the following:

Quote:
depend_br0 () {
need net.eth0 }


Here the handbook forward us to the Writing init Script chapter of the Gentoo Handbook.

I followed this with the script below:

Quote:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
modules=("iwconfig")
essid_wlan0="ESSID"
channel_wlan0="6"
key_ESSID="******** enc restricted"
config_ESSID=("dhcp")

# These are configurations for the LAN interfaces

depend_eth0 () {
need net.wlan0 }
config_eth0=("192.168.3.1/24")
routes_eth0=(
"default via 192.168.0.1")

depend_eth1 () {
need net.wlan0 }
config_eth1=("192.168.2.1/24")
routes_eth1=(
"default via 192.168.0.1")


At boot the system conplained dropping "syntax error: unexpected end of file in line xx" where xx was the number +1 of the last line.
After consulting nic makkk on #gentoo, he changed the script:

Quote:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
modules=("iwconfig")
essid_wlan0="ESSID"
channel_wlan0="6"
key_ESSID="******** enc restricted"
config_ESSID=("dhcp")

# These are configurations for the LAN interfaces

RC_NEED_eth0="net.wlan0"
config_eth0=("192.168.3.1/24")
routes_eth0=(
"default via 192.168.0.1")
RC_NEED_eth1="net.wlan0"
config_eth1=("192.168.2.1/24")
routes_eth1=(
"default via 192.168.0.1")


This way the script works. (This is an other issue that my wlan0 is not up, but that is a different story.)

Pls. check if I made a mistake or the Handbook should be corrected/updated.
_________________
Quis custodiet ipsos, custodes?
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