[Frugalware-darcs] setup-current: netconfig: replaced the spec with a manpage

VMiklos vmiklos at frugalware.org
Thu Mar 16 18:09:45 CET 2006


[netconfig: replaced the spec with a manpage
VMiklos <vmiklos at frugalware.org>**20060118173903] {
hunk ./src/config/net_profiles_spec.txt 1
-preface
-=======
-
-the current /etc/sysconfig/interfaces has lots of limitations so
-i've decided to rework the config file system & the initscript
-
-the first problem is that there are no network profiles which are
-preferred by mobile users. thus instead of the only
-/etc/sysconfig/interfaces file, there will be a
-/etc/sysconfig/network dir and on boot the "default" profile will
-be loaded (of course that can be a symlink)
-
-notes:
-- this is currently only a plan, feel free to blame^H^H^H^H^Hcomment
-  it
-- converting the old config to the new format will be solved
-- netconfig will be updated
-
-here's a short draft about how a profile config will look:
-
-global options
-==============
-
-# multiple usage ok
-dns    = <ip>
-# if defined more than once, the first will be used
-domain = <domain>
-# if defined more than once, the first will be used
-desc   = <description>
-
-interface options
-=================
-
-# multiple usage ok (for eth0:1, eth0:2, etc)
-options   = <ip> [netmask <netmask> [broadcast <broadcast>]]
-or
-# if defined, then other option defines are ignored
-options   = dhcp
-# multiple usage ok
-pre_up    = cmd
-# multiple usage ok
-post_up   = cmd
-# multiple usage ok
-pre_down  = cmd
-# multiple usage ok
-post_down = cmd
-# if defined more than once, the first will be used
-mac       = <mac addr>
-# if defined more than once, the first will be used
-essid     = <essid>
-# if defined more than once, the first will be used,
-# ignored if using dhcp
-gateway   = [default gw] <ip>
-# if defined more than once, the first will be used
-key       = <key>
-# if defined more than once, the first will be used
-dhcp_opts = <hostname>
rmfile ./src/config/net_profiles_spec.txt
addfile ./src/config/netconfig.5
hunk ./src/config/netconfig.5 1
+.TH netconfig 5 "January 18, 2006" "Frugalware 0.4" ""
+.SH NAME
+/etc/sysconfig/network/ \- configuration of network interfaces
+.SH CONFIGURATION
+Every file in /etc/sysconfig/network represents a network profile. When
+netconfig invoked with the start paramter, then the profile named 'default'
+(/etc/sysconfig/network/default) will be read. This profile is divided into
+sections or \fIinterfaces\fP.  Each section defines an interface that netconfig
+should initialize. The exception to this is the \fIoptions\fP section,
+which defines global options.
+.TP
+.SH Example:
+.RS
+.nf
+[options]
+dns = 157.181.177.34
+
+[eth0]
+options = 192.168.1.102 netmask 255.255.255.0
+gateway = default gw 192.168.1.1
+.fi
+.RE
+.SH CONFIG: OPTIONS
+.TP
+.B "dns = <ip>"
+Explicitely defines dns addresses (ie. when using a static ip). Multiple usage is ok.
+.TP
+.B "domain = <domain>"
+Defines the local domain name. If defined more than once, the first will be used.
+.TP
+.B "desc = <description>"
+A brief description of this network profile. Used by netconfig.
+.SH CONFIG: REPOSITORIES
+Each interface section defines a section name.
+The interface name is defined by the string within square brackets (eg, the two
+above are 'eth0' and 'eth1'). The available directives:
+.TP
+.B "options = <ip> [netmask <netmask> [broadcast <broadcast>]"
+Defines the ip address, netmask and broadcast address of the interface.
+Multiple usage is ok for eth0:1, eth0:2, etc. See the other format of this
+directive for dhcp.
+.TP
+.B "opions = dhcp"
+Use dhcp for this interface. When this format is used, the other option lines are ignored.
+.TP
+.B "pre_up = <command>"
+.TP
+.B "post_up = <command>"
+.TP
+.B "pre_down = <command>"
+.TP
+.B "post_down = <command>"
+The synatax of these directives are the same: you can define there commands to be executed
+before the interface is up, after the interface is up, before it is down, and after,
+respectively. Multiple usage is ok, the commands are executed in the specified order.
+.TP
+.B "mac = <mac address>"
+Overwrites the mac address of the card. If defined more than once, the first will be used.
+.TP
+.B "essid = <essid>"
+Set the ESSID (or Network Name - in some products it may also be called Domain ID) for
+wireless network adapters. If defined more than once, the first will be used.
+.TP
+.B "gateway = [default gw] <ip>"
+Route packets via a gateway. NOTE: The specified gateway must be reachable first. If the
+"default gw" prefix is used, then adds a default route. If defined more than once,
+the first will be used. If using dhcp, then this directive is ignored.
+.TP
+.B "key = <key>"
+Used to manipulate encryption or scrambling keys and security mode for wireless networks.
+Examples:
+.RS
+.nf
+key = 0123-4567-89
+key = [3] 0123-4567-89
+key = s:password [2]
+key = [2]
+key = open
+key = off
+key = restricted [3] 0123456789
+key = 01-23 key 45-67 [4] key [4]
+.fi
+.RE
+.TP
+.B "dhcp_opts = <options>"
+These options are passed to the dhcp client daemon. The default is "-t 10". You may want to
+specify here the dhcp hostname, then you'll need "-t 10 -h <hostname>".
+.SH AUTHORS
+Written by Miklos Vajna.
+.SH "REPORTING BUGS"
+Please file a bugreport is you find any bug at <http://bugs.frugalware.org/>.
+.SH "SEE ALSO"
+.BR ifconfig (8),
+.BR route (8),
+.BR iwconfig (8),
+.BR dhcpcd (8)
}


More information about the Frugalware-darcs mailing list