DragonFly BSD
DragonFly kernel List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: configuration files


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Dec 2003 11:23:39 -0800 (PST)

    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




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