The init.d script installed by sys-apps/preload is not compliant with POSIX shell and thus fails to run with OpenRC and non-bash default system shell. This is because of using $(<...) to read files which (probably) has to be replaced by standard 'cat' call. Moreover, the script lacks proper handling of exit codes. The start() function should save $? after calling ssd, and return it afterwards instead of returning ionice result, and the dump() one should either check exit codes of both 'kill' calls or neither.
I no longer use this application and have dropped maintainer-ship.
Created attachment 244507 [details, diff] patch for preload-0.64.init.in I guess this could solve the problem. But for kill function, someone suggest use kill -[0-9] or -[A-Z] instead of the signal name. I'm not sure if this is true.
Will look at it as soon as I have time to, thanks :-) As a side note, if you have any idea about how to solve bug #299140 I will really appreciate it (if you don't know, no problem of course ;-)) Thanks a lot
(In reply to comment #3) > As a side note, if you have any idea about how to solve bug #299140 I will > really appreciate it (if you don't know, no problem of course ;-)) I'll try to prepare a combined patch in a while.
Created attachment 246276 [details] New init.d script The script has been made POSIX compliant. The race condition related to ionice use has been fixed. Additional error handling has been added. Script and command definitions for OpenRC have been added.
Created attachment 246277 [details, diff] Diff against the original script
Packages with non-posix init scripts need to be fixed; however, this is not a blocker for openrc stabilization.
+*preload-0.6.4-r2 (07 Sep 2010) + + 07 Sep 2010; Pacho Ramos <pacho@gentoo.org> +preload-0.6.4-r2.ebuild, + +files/preload-0.6.4.init.in-r1: + Revision bump to fix race condition (bug #299140 by Ambroz Bizjak) and + make it POSIX compliant (bug #310511 by Michał Górny), thanks a lot to + Michał for providing the new init.d script.