The /etc/init.d/pdnsd-online script, which is delivered with net-dns/pdnsd-1.2.8 uses a for-loop construct which seems to be not implemented in dash (and thus probably can be counted as 'bashism' :P): Zakarumiy necoro # dash /etc/init.d/pdnsd-online /etc/init.d/pdnsd-online: 12: Syntax error: Bad for loop variable The for-loop is for ((i=0; i < 10; i=$i+1)) This could probably be replaced by for i in `seq 10` But I'm not a shell-expert, so there might be better solutions.
Hah I somehow missed this one. Unfortunately using seq is not portable so I don't think that's a good option. I wonder if it makes sense to have it wait at all there..
Fixed in 1.2.8-r1.
No, this is not really fixed. Now the script is broken for any shell: lurch:~ # /etc/init.d/pdnsd status * status: stopped lurch:~ # /etc/init.d/pdnsd-online start * Starting pdnsd ... [ ok ] /etc/init.d/pdnsd-online: line 12: [: too many arguments * /var/cache/pdnsd/pdnsd.status socket is missing. * ERROR: pdnsd-online failed to start lurch:~ # Fixing this problem just reveals another flaw: lurch:~ # /etc/init.d/pdnsd status * status: stopped lurch:~ # /etc/init.d/pdnsd-online start * Starting pdnsd ... [ ok ] /etc/init.d/pdnsd-online: line 12: [: -lt: unary operator expected * /var/cache/pdnsd/pdnsd.status socket is missing. * ERROR: pdnsd-online failed to start lurch:~ # I gonna attach a patch to the init script which fixes both issues and hopefully works for dash, too.
Created attachment 267517 [details, diff] pdnsd.online.1.diff
+*pdnsd-1.2.8-r2 (28 Mar 2011) + + 28 Mar 2011; Lars Wendler <polynomial-c@gentoo.org> -pdnsd-1.2.8-r1.ebuild, + +pdnsd-1.2.8-r2.ebuild, files/pdnsd.online.1: + non-maintainer commit: Fixed broken pdnsd-online init script (result of bug + #349335). Committed with kind permission from flameeyes. + Added a different fix than proposed in my patch. Needs less code and thus should be some nanoseconds faster ;)