From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: "DevilKin" <devilkin@gmx.net>
Cc: "lkml" <linux-kernel@vger.kernel.org>
Subject: Re: User/kernelspace stuff to set/get kernel variables
Date: Thu, 13 Dec 2001 17:11:12 +0100 [thread overview]
Message-ID: <003001c183f0$c934b970$8a140237@rennes.si.fr.atosorigin.com> (raw)
In-Reply-To: <20011213155532Z284289-18284+114@vger.kernel.org>
Hi DK.
> Basically: is it possible to - one way or another - set variables at
> kernel boot and read those using userspace utilities?
> for instance: i boot my kernel (using any old bootmanager that
> accepts kernel params)
> LILO: linux network=dhcp
> and later, in the init scripts, i check the value of this variable
> using some sort of userspace program, and if it happends to be
> 'dhcp' i'll invoke the dhcp client.
[--8<--SNIP--8<--]
You'll at least find that in /proc/1/environ
It's a null-terminated list of strings that consist of what you want.
You'll see it as well while dumping the kernel log (dmesg) at the
begining. For my machine, I have:
--8<--
Kernel command line: auto BOOT_IMAGE=linux root=806 devfs=mount idebus=33
--8<--
Regards,
Yann.
--
.---------------------------.----------------------.------------------.
| Yann E. MORIN | Real-Time Embedded | ASCII RIBBON /"\ |
| phone (+33/0) 299 055 231 | Software Designer | CAMPAIGN \ / |
| fax (+33/0) 299 055 221 °----------------------: AGAINST X |
| yann.morin@atosorigin.com www.atosorigin.com | HTML MAIL / \ |
°--------------------------------------------------°------------------°
next prev parent reply other threads:[~2001-12-13 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-13 15:54 DevilKin
2001-12-13 16:03 ` Daniel Freedman
2001-12-13 16:07 ` Richard B. Johnson
2001-12-13 16:11 ` Yann E. MORIN [this message]
2001-12-13 16:20 ` Jan Janak
2001-12-13 16:58 ` Russell King
2001-12-13 19:48 ` Jan Janak
2001-12-13 20:34 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003001c183f0$c934b970$8a140237@rennes.si.fr.atosorigin.com' \
--to=yann.morin.1998@anciens.enib.fr \
--cc=devilkin@gmx.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®