How-to set a parameter in the command line to be used later by a user-space script?
I understand that in the boot command line I can set parameters for the kernel and for kernel modules.
In addition, is it possible to set in the boot command line a parameter for a user space program or script? For instance would it be possible to write something like "export LANG=fr" to be passed to some shell script after init or even rc.S is started? |
You mean you can't use /etc/rc.local nor .bashrc?
|
Here is the way :
Add your parameters in kernel line : Code:
kernel /vmlinuz-2.6.18-308.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet myvalue=25 Code:
[root@a31amit ~]# cat /proc/cmdline Code:
|
Quote:
Your question makes me think that I should have given a bit more of context ;) I am internationalizing Slackware's installer, thus the user should choose in which locale (s)he sees messages during the (text) installation. There are basically two steps in the process: (1) isolinux is used to provide the user with the ability of setting parameters in the boot command line, including which kernel to boot with (Incidentally, a that time (s)he can choose to boot an existing system instead of installing, and run testmem). (2) Linux is booted, then the installation process occurs. Basically I'd like that something I type in step (1) be used in step (2) so that the choice of UI's language be made really early. PS I want to provide an internationalized installer, not several localized installers. |
Quote:
PS Oh, and I almost forgot: welcome to LQ. |
@Didier, Thanks a lot :)
|
All times are GMT -5. The time now is 03:15 PM. |