tech-userlevel archive

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

Re: Making powerd=YES default



On Tue, 02 Aug 2011, Jean-Yves Migeon wrote:
On 01.08.2011 18:57, Alan Barrett wrote:
I suggest making the contents of /etc/defaults/rc.conf be
machine-dependent.  [...]

So I came back to this idea, but implemented it a bit differently. See
the patch attached.

In essence, /etc/defaults/rc.conf includes an arch file (conditioned on
its presence), etc/defaults/rc.arch.conf. This file is found under
src/etc.MACHINE/rc.arch.conf.

At install time, if present, it's installed as a regular config file.

That's not an implementation of my idea. My idea is to give the end user a single /etc/defaults/rc.conf file.

If merging file fragments at build time is too complex, then you could make a decision at run time, since /etc/defaults/rc.conf is a shell script:

    case "$(/sbin/sysctl -n hw.machine_arch)" in
    foo|bar|baz) powerd=YES ;;
    *)           powerd=NO ;;
    esac

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index