Gentoo Archives: gentoo-dev

From: Francesco Riosa <vivo@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New network config for baselayout-ng
Date: Wed, 07 Feb 2007 16:04:10
Message-Id: 45C9F74E.9070004@gentoo.org
In Reply to: Re: [gentoo-dev] New network config for baselayout-ng by Roy Marples
1 Roy Marples ha scritto:
2 > On Wed, 07 Feb 2007 09:47:33 -0500
3 > Patrick McLean <chutzpah@g.o> wrote:
4 >
5 >> So this means that you are planning to stop development of the
6 >> current baselayout in favor of baselayout-ng?
7 >
8 > No. baselayout will get all the nice features that baselayout-ng will
9 > get, except that it will force bash to match the documentation.
10 >
11 >>> We still need something that is "array like" for want of a better
12 >>> phrase, so how about delimiting using ; like so
13 >>> config_eth0="10.1.1.1 netmask 255.255.255.0; 10.1.1.2/24"
14 >>>
15 >> Couldn't you use the current config on bash shells and parse it to
16 >> something like that on non-bash. There is no reason why the shell
17 >> needs to source the config file, it could be parsed just as easily,
18 >> and writing the parser shouldn't be too hard with a bit of sed magic.
19 >
20 > Not being rude or anything, but what does it take to get this into
21 > peoples mindlessly thick skulls?
22 >
23 > THE CONFIG FILE HAS TO BE PARSEABLE BY ANY SHELL
24 >
25 > or
26 >
27 > EVERY SHELL HAS TO BE PATCHED TO UNDERSTAND BASH ARRAYS
28 >
29 > Simply put, this has to work where /bin/sh is any valid POSIX shell.
30 >
31 > #!/bin/sh
32 > . /etc/conf.d/net
33
34 or:
35
36 #!/bin/zsh
37 . /lib64/rcscripts/net/conf-net-wrapper-zsh
38
39 #!/bin/bash
40 . /lib64/rcscripts/net/conf-net-wrapper-bash32
41
42
43 that would do what you want, some microseconds slower
44
45 please don't change the best networking setup script around.
46
47 --
48 gentoo-dev@g.o mailing list