the init-script fails with (syslog): asterisk_wrapper: /lib64/rc/sh/runscript.sh: 43: set: Illegal option -o pipefail when /bin/sh -> dash Perhaps one can work around this somehow... Reproducible: Always Steps to Reproduce: 1. ln -snf dash /bin/sh 2. /etc/init.d/asterisk start Actual Results: asterisk(-wrapper) doesn't start, logs failure to syslog Expected Results: asterisk starts
Sounds like the asterisk wrapper may need some minor changes. Jaco, whilst we don't purport to support dash right now, can you see if lesser shells like this can cope, or whether we should have /bin/bash instead of /bin/sh?
dash is posix only and init-scripts *should* be also posix-only for compatibility reasons. if you need bash-features, use #!/bin/bash in external shell-scripts. But everything within #!/sbin/runscript is executed as "/bin/sh" and *not* "/bin/bash". So take care within init-scripts not to use any bashisms. thanks. btw: you could also have /bin/sh -> busybox ;-)
This is not about the init script but about the wrapper. It can demand /bin/bash as it is external.
yeah, that would be the easiest fix. do so!
hmmm, but this "wrapper-script" seems to be part of the init-script, and the error is also triggered from there... see asterisk_run_loop() so it's /bin/runscript, which is basically /bin/sh.
What happened with my comments re this? set -o pipefail ${NICE} /usr/sbin/asterisk ${OPTS} 2>&1 >/dev/null result=$? set +o pipefail We can nuke the first and last lines there - which is what is causing the problem. We used to have a 2>&1 | logger -t asterisk_wrapper there in which case we needed the pipefail to detect asterisk failures correctly. Since it's going /dev/null now we can just remove the two set lines and we will pass the dash test. Much easier than externalizing the loop.
+*asterisk-1.8.15.1 (03 Sep 2012) + + 03 Sep 2012; Tony Vroon <chainsaw@gentoo.org> +files/1.8.0/asterisk.initd3, + +asterisk-1.8.15.1.ebuild: + Security upgrade on the 1.8 branch, addressing a privilege escalation in the + manager interface and a failure to apply IAX2 ACLs when using Asterisk + Realtime Architecture (ARA). Fixes by Jaco Kroon address bug #429492 and bug + #432464.
+*asterisk-10.7.1 (03 Sep 2012) + + 03 Sep 2012; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.8.14.1.ebuild, + -asterisk-1.8.15.0.ebuild, -asterisk-10.6.1.ebuild, -asterisk-10.7.0.ebuild, + +asterisk-10.7.1.ebuild: + Security upgrade on the 10 branch, addressing a privilege escalation in the + manager interface and a failure to apply IAX2 ACLs when using Asterisk + Realtime Architecture (ARA). Fixes by Jaco Kroon address bug #429492 and bug + #432464. Clean out all vulnerable non-stable ebuilds.