adding asterisk to the group dialout
Tzafrir Cohen
tzafrir.cohen@xorcom.com
Thu, 14 Apr 2005 01:55:38 +0300
On Thu, Apr 14, 2005 at 12:19:32AM +0200, Kilian Krause wrote:
> Hi Tzafrir,
>
> > The postinst script of asterisk does not seem to add asterisk to the
> > dialout group. Isn't that group the group for the zaptel devices?
>
>
> yes it is. And that's a (known) bug Jose and I had already been talking
> about. =)
>
> Thanks for bringing it back onto the TODO!
Here's my current idea. I must admit I could not figure out what the
current lines do. There seem to be some typos. The TODO I've added is
to handle the case of existing Rapid users. It may be less critical for
existing Sid/Sarge users.
--- /home/tzafrir/Proj/Alioth/pkg-voip/asterisk/trunk/debian/postinst 2005-02-19 10:14:20.000000000 +0200
+++ debian/postinst 2005-04-14 01:01:57.795493099 +0300
@@ -18,9 +18,12 @@
if [ "`getent passwd asterisk|awk -F: '{print $6}'`" = "/var/run/asterisk" ];then
usermod -d /var/lib/asterisk asterisk
fi
+ # TODO: check if not in group dialin and /dev/zap is in
+ # group dialin and add me to group dialin.
else
- adduser --system --group --home /var/lib/asterisk --gecos "Asterisk PBX daemon" asterisk
- adduser asterisk audio
+ adduser --system --home /var/lib/asterisk \
+ --gecos "Asterisk PBX daemon" asterisk
+ usermod -G dialin,audio asterisk
fi
test -d /var/log/asterisk || mkdir /var/log/asterisk
test -d /var/log/asterisk/cdr-csv || mkdir /var/log/asterisk/cdr-csv
--
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen@xorcom.com http://www.xorcom.com