[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/sysconfig or /etc/hostconfig (was Re: /etc/default)



cas@taz.net.au (Craig Sanders)  wrote on 05.08.96 in <[🔎] Pine.LNX.3.94.960805095053.3733F-100000@siva.taz.net.au>:

> discussion so far has concentrated on this. This will require massive
> changes to the system so that binaries know how to use the default

I'd really prefer if people don't put up straw men to attack a proposal.

Nowhere at all has the /etc/default proposal asked for massive changes to  
the system.

Nowhere at all has someone asked that tar be changed to support
/etc/default/tar.

This is just not true.

> BSD:
>
> ---cut here---extract of sample /etc/sysconfig---
> hostname="host.domain.blah"
> defaultdomainname=NO
> tcp_extensions=YES
> ipfirewall=YES
> network_interfaces="ed0 lo0"
> ifconfig_ed0="inet xxx.xxx.xxx.xxx netmask 255.255.255.0"
> ifconfig_lo0="inet localhost"
> route_loopback="${hostname} localhost"
> defaultrouter=203.2.135.53
> routedflags=NO
> timedflags=NO
> xntpdflags="NO"
> tickadjflags="-Aq"
> ---cut here---sample /etc/sysconfig---
>
> NextStep:
>
> ---cut here---sample /etc/hostconfig---
> HOSTNAME=hostname
> INETADDR=xxx.xxx.xxx.xxx
> ROUTER=-ROUTED-
> IPNETMASK=
> IPBROADCAST=-AUTOMATIC-
> NETMASTER=-YES-
> YPDOMAIN=-NO-
> TIME=-AUTOMATIC-
> ---cut here---sample /etc/hostconfig---
>
>
> The nice thing about these types of files is that they're easily parsed in
> sh.  In fact, they can even be sourced in an /etc/init.d/* script to provide
> environment variables (although that might have undesirable side-effects).

In fact, that is the *exact* syntax that /etc/default uses. Except that it  
doesn't throw unconnected stuff into the same file, which strikes me as a  
bad idea.

But then, that's very similar to the BSD style of rc scripts vs. the SysV  
style.

>     - a defined standard for how /etc/init.d scripts should use this
>       information.  e.g. source the file or:
>
>               sed -n -e '/^NEWS_SERVER=/s/\([^=]*\)=\(.*\)/\2/p'

Why not simply source it?

Oh, I forgot - you lumped all of /etc/default together in one file.

Unnecessary complication. Besides, it makes for name clashes.


MfG Kai



Reply to: