[Discuss] environment variables in debian

Noel Burton-Krahn noel at burton-krahn.com
Tue May 20 22:12:35 PDT 2008


Something's missing here.  Do you mean a driver as in a kernel module?
 If so, those don't ever see user-level environment variables.  Do you
need a module parameter set, or an environment variable passed to
depmod?

If you really want to set an environment variable for all processes,
then you can set it in init, the father of all processes:

cat >>/bin/myinit <<EOF
#! /bin/sh
export VARIABLE=value
exec /bin/init "$@"
EOF
chmod a+x /bin/myinit

then, in grub, add this to the linux kernel's command line:

init=/bin/myinit

~Noel



On Tue, May 20, 2008 at 2:03 PM, pw <p.willis at telus.net> wrote:
> Hello,
>
> I have a driver that requires me to set a global environment
> variable to point to a directory with firmware for the
> PCI card.
>
> The trouble is that, during boot, Debian does not appear to use
> the environment variables from '/etc/environment'.
>
> *Where* can I set environment system wide variables that can be used
> as drivers are loading during hardware discovery at boot?
>
> Where do I set global system environment variables at all in a
> standard way on Debian?
>
> Thanks,
>
> Peter
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
>


More information about the Discuss mailing list