public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Freedman <freedman@ccmr.cornell.edu>
To: linux-kernel@vger.kernel.org
Subject: Re: User/kernelspace stuff to set/get kernel variables
Date: Thu, 13 Dec 2001 11:03:38 -0500	[thread overview]
Message-ID: <20011213110338.I7781@ccmr.cornell.edu> (raw)
In-Reply-To: <20011213155532Z284289-18284+114@vger.kernel.org>
In-Reply-To: <20011213155532Z284289-18284+114@vger.kernel.org>; from devilkin@gmx.net on Thu, Dec 13, 2001 at 04:54:05PM +0100

On Thu, Dec 13, 2001, DevilKin wrote:
> Hello
> 
> I've been looking on the web, and couldn't really find what i would want...
> 
> Basically: is it possible to - one way or another - set variables at kernel boot and read those using userspace utilities?

Sorry, I don't know, but see below for possible solution to your problem anyway.

> for instance: i boot my kernel (using any old bootmanager that accepts kernel params)
> 
> 
> LILO: linux network=dhcp

You might want to familiarize yourself with the following kernel parameter:

"ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>"

where most options are obvious, and you'll probably want device to be
"eth0" and autoconf to be "dhcp".

HTH,

Daniel


> 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. 
> Otherwise i'd just give a static address.
> 
> I have other uses for this, for instance, you want your disks to be FSCK'ed, but don't wanna boot first, or, don't wanna go in single user mode
> 
> 
> LILO: linux dofsck=true
> 
> 
> Does something like this exist? Is it implementable in an easy way? (I know a few programming languages, but only little C(++)....)
> 
> Thanks
> 
> 
> DK
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Daniel A. Freedman
Laboratory for Atomic and Solid State Physics
Department of Physics
Cornell University

  reply	other threads:[~2001-12-13 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 15:54 User/kernelspace stuff to set/get kernel variables DevilKin
2001-12-13 16:03 ` Daniel Freedman [this message]
2001-12-13 16:07 ` Richard B. Johnson
2001-12-13 16:11 ` Yann E. MORIN
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=20011213110338.I7781@ccmr.cornell.edu \
    --to=freedman@ccmr.cornell.edu \
    --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