Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345307 - net-misc/asterisk - startup script wrapper fails to restart asterisk
Summary: net-misc/asterisk - startup script wrapper fails to restart asterisk
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-13 16:42 UTC by Jaco Kroon
Modified: 2011-07-04 14:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2010-11-13 16:42:11 UTC
At lines 110 of the startup script (installed with 1.6.2.13-r2) contains this code:

  else
    set -o pipefail
    ${NICE} /usr/sbin/asterisk ${OPTS} 2>&1 >/dev/null | logger -t asterisk_wrapper
    set +o pipefail
    result=$?
  fi

The resetting of pipefail before grabbing the result in this case is causing the problem and set +o pipefail and result=$? just needs to be swapped about.

Reproducible: Always
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2010-12-02 13:35:20 UTC
+*asterisk-1.6.2.14 (02 Dec 2010)
+
+  02 Dec 2010; <chainsaw@gentoo.org> +files/1.6.2/asterisk.initd3,
+  -files/1.6.2/asterisk.logrotate, -files/1.6.2/asterisk.logrotate2,
+  -asterisk-1.6.2.13.ebuild, -asterisk-1.6.2.13-r1.ebuild,
+  +asterisk-1.6.2.14.ebuild:
+  Consolidate patchset in a tarball on the mirrors, closes bug #344015 by
+  Marcin Baczyński. Drop logrotate USE-flag, always install snippet, closes
+  bug #344181 by Jeroen Roovers. Updated init script to fix restart bug by Jaco
+  Kroon, closes bug #345307. Version bump closes bug #346737 by Jesse Adelman,
+  with an honourable mention for Kerin Millar for pointing out some QA matters
+  which are now fixed.

I also snuck this one into Kerin's 1.4.37 ebuild, that leaves just 1.8.0 for later.
Comment 2 Erik Wallin 2011-07-04 13:56:01 UTC
This bug is not resolved in the current ebuilds (1.6.2.18.2,1.6.2.19,1.8.4.4).

The version of /etc/init.d/asterisk with the fix is not used, but an old version that still has the error.

The ebuilds are using the file

net-misc/asterisk/files/asterisk.initd2

but the fix is in

net-misc/asterisk/asterisk.initd3
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2011-07-04 14:51:00 UTC
Reopening, as per Erik Wallin this is not fixed.
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2011-07-04 14:59:36 UTC
+*asterisk-1.8.4.4-r1 (04 Jul 2011)
+*asterisk-1.6.2.19-r1 (04 Jul 2011)
+
+  04 Jul 2011; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.6.2.19.ebuild,
+  +asterisk-1.6.2.19-r1.ebuild, -asterisk-1.8.4.4.ebuild,
+  +asterisk-1.8.4.4-r1.ebuild:
+  Actually install the newest init script with Jaco Kroon's restart fixes; as
+  pointed out by Erik Wallin (reopened) bug #345307.

Unfortunately I am not able to modify 1.6.2.18.2 at this time; it was fast-tracked to stable for a security bug.