PDA

View Full Version : Passing arguments to knoppix.sh via boot options



gogoye
07-16-2004, 08:12 AM
Hello,

I would like to make a cluster of knoppix machines, and therefore I've added a client package on my Knoppix CD. An executable in this package is launched via the knoppix.sh script placed at the root of the cdrom, thus it's launched when knoppix starts.

My problem is that I don't know how to pass arguments at boot time to this script, in order to configure my cluster client.

Any idea ?

Thanks !

PS : sorry for my strange english ;)

gogoye
07-16-2004, 03:32 PM
Maybe there is a way to initialize environment variables at boot time ?

el_supremo
07-16-2004, 04:18 PM
The linuxrc script gets at the boot command line by setting a shell variable like this:

CMDLINE="$(cat /proc/cmdline)"

and in my system at least, the file /proc/cmdline still contains the boot command after the boot is complete so you should be able to use this to do what you need.

Best Wishes
Pete

gogoye
07-16-2004, 08:07 PM
Thanks, I will test that.