site  contact  subhomenews

Bug in init due to ash incompatibility

December 26, 2018 — BarryK

There was a bug report before 0.9.14 was released, that if a SFS was installed to the main filesystem, not in a container, then the menu entry was wrong. I announced it as fixed for 0.9.14.

I had inserted the fix into /sbin/fixlayers script in the initrd, and examined the code very carefully, and it was crystal-clear so ticked it off as fixed, without actually testing it.

Bad move! I discovered today that this line failed:


What that is supposed to do is transform a string like "abc/def/xyz" to "xyz", that is, delete everything before and including the last "/" character.

It works in bash, and I am so accustomed to doing it this way, didn't think to check that it will work in busybox ash. Instead, have to to it this way, which works for both bash and ash:


So, SFS menu entry will be fixed for the next release. 

Tags: easy