On Tue, 6 Feb 2007 19:09:26 +0000 Roy Marples <[EMAIL PROTECTED]> wrote:
> The stuff that handles our networking maybe written in A.N. > Other-Language (Mrs.), but keeping /etc/conf.d/net readable by a shell > script does have advantages. You need to define what shell (or subset) you want to parse it. 'sh' itself varies from platform to platform. The one we have is a softlink to bash so doesn't make any difference for Gentoo Linux except for limiting what can be written. I just tried variable redirection for example (which can be used to implement pseudo-arrays without using eval) - I was surprised it works in sh here - dunno if it works in BSD sh (doesn't on busybox). What you have on FreeBSD may be different from what's on Solaris. Perhaps busybox sh might be a practical set to choose, for basic posix compliance. You could simply do something like: ifconfig_eth0="\ 10.1.1.1 netmask 255.255.255.0;\ 10.1.1.2 netmask 255.255.255.0" which means standard shell interpretation doesn't lose information, even if it's actually normally parsed by something else (chose ';' as a separator since ':' is used in ipv6 strings). It seems to me that the problem you're trying to solve, is the implementation of baselayout on restricted systems. Reducing all init.d/conf.d and so on to a common denominator for everyone isn't necessarily the best way forward. A different approach could be to provide more than one baselayout; one for large systems, where expecting to have bash available isn't such a big deal, and one for limited systems, restricted to busybox-standard sh. Actually I kinda assumed that's what baselayout-lite was all about... -- Kevin F. Quinn
signature.asc
Description: PGP signature