reading /proc/cmdline
Dan Trainor
info at hostinthebox.net
Wed Aug 24 22:54:26 UTC 2005
Hello, all -
I use the following example of code in my kickstart file, to get values
from /proc/cmdline to use later on during the install:
if grep -i -q "mystring[a-zA-Z0-9]" /proc/cmdline
then
MYSTRING=`cat /proc/cmdline | sed 's/.*mystring=\([^ ]*\).*/\1/'`
fi
I think Klaus in fact gave this to me. However, I've ran into a few
problems. It seems that this does not like strings with periods in
them, such as an IP address.
Since I know a bit less than nothing about regular expressions, I was
hoping that someone could give me a hand with this. I need to modify it
to allow me to assign a dotted quad string to the MYSTRING variable.
Again, any help would be greatly appreciated.
Thanks!
-dant
More information about the Kickstart-list
mailing list