I didn't like the network scripts, especially the ifconfig.* directory
structure.  It seemed too complex, especially for my needs.  I looked at
some Linux books to see other ways to set up network cards.  I finally
decided to have a configuration file, in my
case, /etc/sysconfig/ifconfig.d/ath0, hold all of the configuration
parameters.  The scripts aren't complete, however, and only do what I
need.

My network scripts are a modification of scripts that someone sent me
when I was trying to get my card working.  Unfortunately, I don't
remember his name and I can't find his email.

I would like the network scripts to be modular, so adding DHCP would add
a module, wireless would add another module, etc, and ifup simply calls
them and doesn't need to be modified.

Does it matter what order the interfaces start up in?


On Fri, 2005-05-06 at 21:00 -0600, Archaic wrote:
> Some notes as I attempt to make the lfs bootscripts more
> wireless-friendly:
> 
> Currently the networking scripts allow only for one default gateway.
> However, each interface should have it's own. When trying to do that
> manually with ip, it bombs. Since I still prefer net-tools I decided to
> try it with route and it works swimmingly. After discussing this with
> Jim, he said he would send a bug report upstream to fix ip. Once this is
> done, the code will need to be changed to only grep for a default
> gateway on the interface that is being setup, not all interfaces.
> 
> Is it necessary for the scripts to still maintain code to allow it to
> act as it did long ago? I'm referring specifically to ifconfig.* being a
> file and not a directory. If we never allow a break from the old ways,
> the code will get bigger and clunkier.
> 
> Lastly, I see a need for a user-configurable file to dictate which order
> interfaces should be brought up. While this probably won't ultimately
> clean up the code (as we will still need code to reverse the process),
> it will allow people to bring up interfaces in a non-alphabetical order.
> 
> I'm toying with some ideas here, but comments and suggestions are most
> appreciated.
> 
> -- 
> Archaic
> 
> Want control, education, and security from your operating system?
> Hardened Linux From Scratch
> http://www.linuxfromscratch.org/hlfs
> 
# Set up NIC interface on boot if ONBOOT is yes.
ONBOOT=yes

# If WIRELESS is yes, run iwconfig.
WIRELESS=yes

# IF DHCP is yes, ask DHCP server for address.
DHCP=yes

# TYPE is ipv4 or ipv6
TYPE=ipv4

# Ignore if DHCP is true.
IPADDR=10.0.0.1
NETMASK=255.0.0.0
NETMASKBITS=22

# Optional.
BROADCAST=10.255.255.255
NETWORK=10.0.0.0
GATEWAY=

# Wireless parameters

# Enable on Hotplug.
ONHOTPLUG=yes



#######################################################################33#
# Wireless Settings

# The bit-rate is the speed at which bits are transmitted over the medium
RATE=auto

# Set the operating frequency or channel in the device 
CHANNEL=1

# Set the operating mode of the device.
# Modes: Ad-Hoc:    network composed of only one cell and without Access Point.
#        Managed:   node connects to a network composed of many Access Points, 
#                   with roaming.
#        Master:    the node is the synchronisation master or act as an Access 
#                   Point.
#        Repeater:  the node forward packets between other wireless nodes.
#        Secondary: the node act as a backup master/repeater.
#        Monitor:   the node act as a passive monitor and only receives packets.
#        Auto:      Auto-detect mode
MODE=Managed

# The security mode may be open or restricted.
# Modes: open       - no authentication is used and the card may also accept 
#                     non-encrypted sessions.
#        restricted - only encrypted sessions are accepted and the card will 
#                     use authentication.
SECURITY_MODE=open

# WEP Keys
WEP_KEY1=
WEP_KEY2=
WEP_KEY3=
WEP_KEY4=

ESSID=xxxxxx

Attachment: ifup
Description: application/shellscript

Attachment: wireless
Description: application/shellscript

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to