<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2757/">https://reviewboard.asterisk.org/r/2757/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By wdoekes.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">See patch.
The patched safe_asterisk is supposed to read values from safe_asterisk.conf, but it never did. It tried to grep a directory (non-recursively).
This fixes that search (and makes the code less ugly).
But, there are a few other points that I'd like to address:
- Why did someone use "#"-comments in the configs/safe_asterisk.conf.sample? We use ";"-commands everywhere else? (And the first line isn't commented out?)
- I'd rather see a debian style "defaults" file read: if [ -f /etc/defaults/safe_asterisk ]; then source /etc/defaults/safe_asterisk; fi. Then the parsing gets delegated to the shell and we can make things dynamic if we want. But that might be too debian/ubuntu specific. What do other OS-es do?
- The file has vim:tabstop=4. That's wrong. If you want tabs of 4 spaces, use 4 spaces (sts=4:sw=4:(et)). It also has textwidth=80, but the authors didn't respect it. Let the line go, or use it.
- I see now that UMASK was checked down the file. Missed that one.
- NOTIFY default should be root. Not empty. The admin will have root aliased to a real e-mail address.
- I'd put DUMPDROP/chdir in /var/spool/asterisk (not /tmp). That's supposed to exist. And if you want, you can restrict access to the asterisk user. But that's open for debate.
- If set TTY= is set, asterisk output is redirected to ttyN, but safe_asterisk echo's still go to stdout/stderr (but only if the terminal that run_asterisk() was started on is still open and reading from those pipes (the reason why we need to trap PIPE)). All those echo's should go or be redirected to $TTY. And run_asterisk & should get a >/dev/null 2>&1.
But other than that I'm perfectly happy with it. The automatic restart with mailings about why, have been quite useful.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/contrib/scripts/safe_asterisk <span style="color: grey">(396558)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2757/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>