Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445182 - >=net-misc/asterisk-10.10.0-r1 - init script: /run/asterisk does not exist, 'keepdir /var/run/asterisk'
Summary: >=net-misc/asterisk-10.10.0-r1 - init script: /run/asterisk does not exist, '...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks: keepdir-var-run_lock
  Show dependency tree
 
Reported: 2012-11-29 12:03 UTC by Vincent Brillault
Modified: 2012-12-16 16:35 UTC (History)
1 user (show)

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


Attachments
Create /var/run/asterisk if it doesn't exists (asterisk.initd3.patch,745 bytes, patch)
2012-11-29 12:03 UTC, Vincent Brillault
Details | Diff
Create /var/{log,run}/asterisk if they don't exist (asterisk.initd3.patch,594 bytes, patch)
2012-11-29 17:20 UTC, Vincent Brillault
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Brillault 2012-11-29 12:03:46 UTC
Created attachment 330920 [details, diff]
Create /var/run/asterisk if it doesn't exists

With the recent change in /var/run (symlink to the tmpfs /run), the /var/run/asterisk folder doesn't exist anymore. As other packages, asterisk should remove the 'keepdir /var/run/asterisk' from the ebuild and add a checkpath in the init script.

Example of current execution:
 /etc/init.d/asterisk start
 * Starting asterisk PBX ...
 *   Core dump size            : unlimited
 *   Core dump location        : /var/lib/asterisk/coredump
 *   Max open filedescriptors  : 4096
find: `/var/run/asterisk': No such file or directory
 *   Starting asterisk as      : asterisk
cat: /var/run/asterisk/asterisk.pid: No such file or directory    [ !! ]
 * ERROR: asterisk failed to start

I included a simple patch that fixes the ebuild
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2012-11-29 14:55:26 UTC
This applies to all three branches; I will apply this on the next update. Unless of course there are plans to stabilise the openrc release that breaks this, in which case I will have to book an emergency stable on the 1.8 branch?
Comment 2 Jaco Kroon 2012-11-29 15:42:43 UTC
Hi,

Please drop the 2>/dev/null - it might hide other errors that we do want to know about.

Instead just move the checkpath to just before the "for element in `find /var/{log,run}/asterisk`; do" line.
Comment 3 Vincent Brillault 2012-11-29 17:20:55 UTC
Created attachment 330954 [details, diff]
Create /var/{log,run}/asterisk if they don't exist

You are perfectly right. I miss-read the find (because of the recursive chown/chmod inside the loop).
Comment 4 Jaco Kroon 2012-11-29 17:29:54 UTC
Tony, you've got my OK on that patch - for what it's worth :).
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2012-11-29 18:14:36 UTC
Thank you gentlemen.
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2012-12-01 22:07:28 UTC
+*asterisk-11.0.1-r2 (01 Dec 2012)
+*asterisk-10.10.0-r2 (01 Dec 2012)
+*asterisk-1.8.18.0-r2 (01 Dec 2012)
+
+  01 Dec 2012; Tony Vroon <chainsaw@gentoo.org> +files/1.8.0/asterisk.initd4,
+  -asterisk-1.8.18.0-r1.ebuild, +asterisk-1.8.18.0-r2.ebuild,
+  -asterisk-10.10.0-r1.ebuild, +asterisk-10.10.0-r2.ebuild,
+  -asterisk-11.0.1-r1.ebuild, +asterisk-11.0.1-r2.ebuild:
+  OpenRC has seen fit to overhaul /var/run; as identified by Vincent Brillault
+  in bug #445182 our init scripts require immediate adjustments. With thanks to
+  Jaco Kroon for review. Updating all three branches and removing all
+  non-stable now unusable ebuilds.

Arches, please test & mark stable =net-misc/asterisk-1.8.18.0-r2
Target keywords: amd64 x86

Repeated start/stop (3 cycles) on default config files will suffice if you do not have the necessary hardware and/or accounts in place. This is an emergency stable as the daemon becomes unusable and said new OpenRC is stable.
Comment 7 Agostino Sarubbo gentoo-dev 2012-12-02 11:37:25 UTC
amd64 stable
Comment 8 Vincent Brillault 2012-12-04 15:49:13 UTC
I just though about something: shouldn't the 'keepdir /var/run/asterisk' be removed from the ebuilds as stated in bug 332633 ? In that case, the pkg_config function should also be altered (remove 'run' in the loop).
Comment 9 Tony Vroon (RETIRED) gentoo-dev 2012-12-04 15:50:38 UTC
Changes are live, this is too late to have a change of heart. Sorry.
Comment 10 Agostino Sarubbo gentoo-dev 2012-12-16 16:35:40 UTC
x86 stable. Last arch, closing