/etc/init.d/rtirq (from package rtirq) is a "#!/bin/sh" script, but uses a bash-only "function" syntax, not supported by dash ('fuction foo ()' instead of 'foo ()').
FIX:
sed -i "s/^function //" /etc/init.d/rtirq
Similarly, upgrading gave me these two errors, caused by bashism ('[ "$blah" == "" ]' instead of '[ "$blah" = "" ]' in postinst scripts):
Setting up 64studio-skel (2.1~pre14) ...
[: 38: ==: unexpected operator
Setting up 64studio-themes (2.1~pre14) ...
[: 48: ==: unexpected operator
FIX:
in each deb package:
sed -i "s/==/=/" debian/postinst
RATIONALE:
Scripts that use "#!bin/sh" must be POSIX compliant and they should be tested with dash, which is lighter and faster than bash (and thus a better choice as a script interpreter), and POSIX compliant as opposed to bash.
If a script really needs some bash-only syntax it should use "#!/bin/bash", otherwise it's better to stick with dash syntax (which of course is bash-compatible as it's a subset).
It should be noted that debconf, when installing dash, asks whether to link it to /bin/sh or not, of course expecting that no script breaks the aforementioned rule.
Slán
-- Emanuele --