Problem parsing optional parameters to boot options

Started by maf, March 25, 2012, 21:10:11 PM

Previous topic - Next topic

maf

Hi,

I think I might have stumbled upon a small bug in the boot option parsing code.

The boot option nfsmount can take optional parameters after a '|'. This is implemented in etc/rc.d/init.d/nfsmount bymountoptions=$(echo $nfsmount|cut -d\| -f2) Unfortenately, cut will return its input text if it does not contain any delimiters. With an additional option '-s', cut will return an empty string under those circumstances. Somountoptions=$(echo $nfsmount|cut -d\| -f2 -s)should do the trick.

Other scripts that use similiar code are not affected immediately because the other boot options' parameters are mandatory.

Cheers,
Malte

Elmar

thanks, the fix will be in the next release

best regards
elmar

Elmar

boot scripts are now updated in the new test release 4.2.1-test2
http://www.plop.at/en/ploplinux/download.html#dltest

additional updates:
latest Midnight Commander
latest Smartmon Tools

as workaround for 4.2.0 use the "|" even if you don't use any additional parameters

best regards
elmar