Author Topic: Problem parsing optional parameters to boot options  (Read 3688 times)

maf

  • Newbie
  • *
  • Posts: 1
Problem parsing optional parameters to boot options
« on: March 25, 2012, 21:10:11 PM »
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 by
Code: [Select]
mountoptions=$(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. So
Code: [Select]
mountoptions=$(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

  • Administrator
  • Hero Member
  • *****
  • Posts: 2440
  • a command shell is enough to do amazing things
Re: Problem parsing optional parameters to boot options
« Reply #1 on: March 25, 2012, 21:15:59 PM »
thanks, the fix will be in the next release

best regards
elmar

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2440
  • a command shell is enough to do amazing things
Re: Problem parsing optional parameters to boot options
« Reply #2 on: March 26, 2012, 06:46:33 AM »
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
« Last Edit: March 26, 2012, 06:48:17 AM by Elmar »