Re: Soekris Net 4511 kernel config and script
I need some quick suggestions for fixing embedded while loops to check for multiple flags. I want to use two while loops where one is inside the other. If you look at the script link above you will see what I'm saying.
My positional parameters or special parameter "#@" specifically the positional number of parameters "$#" is exhausted, since 'shift' actually unsets the parameter. With no way to assign to this variable, I cannot simply make a function that stores and restores the original positional parameters to check for more flags.
On top of this, the only thing I could think of immediately was "duplicating" the positional parameters and using the secondary array or list in the next while loops, checking for flags.
For example, if someone specifies only --tmpdir=/tmp --new-kernel --device=/dev/sdb --logfile=/tmp/script.log my positional parameters are exhausted within the --new-kernel loop looking for --kernel-archive, now you ask.. maybe why not just remove the --kernel-archive and other kernel stuff to simply avoid it, well, some people need to use a specific kernel version with specific patch sets and don't want to retrieve a new kernel everytime they test a simple patch for an embedded device. So.. this presents somewhat of a problem because I like the embedded while looping.
Anyone got any quick suggestions?
|