configuration files

Matthew Dillon dillon at apollo.backplane.com
Thu Dec 11 11:25:38 PST 2003


    I personally prefer NOT to use XML for something like this.  I just
    don't see the point... all it does is add reams of API junk that all
    devolve down into accessing some variable or other.

    The /bin/sh variable=data form is probably as powerful a mechanism as
    we would ever need, especially when combined with autoconf-like mechanisms
    such as, for example, access to the DHCP variable space.  In fact, it
    occurs to me that we could augment 'kenv' to allow setting kernel 
    env variables in addition to retrieving them and use the space to store
    DHCP and/or autoconf variables.  That would be pretty damn cool.  Then
    /etc/rc.conf could be trivially conditionalized.

    Even now for diskless boots we can trivially do stuff like this in
    the server's /etc/rc.conf:

    if [ X`kenv boot.nfsroot.path` != X ]; then
	nfs_client_enable="YES"
	sendmail_enable="NO"
	if [ `kenv boot.netif.ip` = 216.240.41.58 ]; then
	    blah=X
	    fubar=Y
	fi
    fi

    I am trying to imagine the work involved in trying to do the above
    in XML.

						-Matt






More information about the Kernel mailing list