mikshaw


Group: Members
Posts: 4856
Joined: July 2004 |
 |
Posted: Feb. 16 2007,17:43 |
 |
The boot line is stored in /proc/cmdline, so you can get the string like this:
Code Sample | CMDLINE=`cat /proc/cmdline` |
From there you can use the $CMDLINE variable along with some of DSL's built-in functions to find a particular boot option. That variable is used extensively in dsl-functions. This command will load the functions into your current script:
Code Sample | source /etc/init.d/dsl-functions |
As an example, you could send "pictures=/path/to/directory" on the bootline, and then in your script do something like this:
Code Sample | source /etc/init.d/dsl-functions CMDLINE=`cat /proc/cmdline` PICTURES=`getbootparam pictures` |
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|