asterisk-config is running asterisk_fix from package asterisk.

Thiago Martins thiago at principaltelecom.com.br
Tue Jul 18 18:12:52 UTC 2006


Em Sex, 2006-07-14 às 22:28 +0300, Tzafrir Cohen escreveu:
> On Fri, Jul 14, 2006 at 04:18:06PM -0300, Thiago Martins wrote:
> > On Fri, 2006-07-14 at 21:53 +0300, Tzafrir Cohen wrote:
> > > On Fri, Jul 14, 2006 at 03:38:20PM -0300, Thiago Martins wrote:
> > > > People,
> > > > 
> > > >  I install asterisk-classic_1.2.9.1.dfsg-1.dapper.1979_i386.deb but I
> > > > see that the script asterisk_fix is not running, the things that it
> > > > should do didn't happen.
> > > 
> > > asterisk_fix belongs in the package asterisk . There is no point in
> > > applying config changes before there is an init.d script to start the
> > > server.
> > > 
> > > Can anybody find a case where this assumption breaks?
> > 
> >  If asterisk_fix belongs in the package asterisk, why
> > asterisk-config.postinst call it? This is normal?
> 
> This is expected. But it is a bug to use it without first testing for
> its existance.
> 
> asterisk_fix neds to be run as a pre-confition to the run of the
> asterisk daemon, and also to fix "damage" by changes of other packages.
> If the package 'asterisk' is not installed, the asterisk daemon is not
> currently running, and the fix will be done when the package asterisk
> will be installed.
> 
> If the package asterisk is already installed, and other package can
> initiate an asterisk_fix.

And...

 The script asterisk_fix is in the
asterisk_1.2.10.dfsg-1.dapper.2078_all.deb package and when
asterisk-config_1.2.10.dfsg-1.dapper.2078_all.deb is installed or
reconfigured, the /usr/share/asterisk/bin/asterisk_fix is executed.

* First, there is NO packages "asterisk*" installed, this is a fresh and
first install on this machine, no update from asterisk-1.2.9.1...

 The dirs are created and somethings now works, but:

1) When the scripts detects that a user asterisk don't exist and will
create then, I see this warning:

....
Setting up asterisk-config (1.2.10.dfsg-1.dapper.2078) ...
+ getent passwd asterisk
+ adduser --system --group --home /var/lib/asterisk --gecos 'Asterisk
PBX daemon' asterisk
adduser: Warning: The home dir you specified already exists.
Adding system user `asterisk'...
Adding new group `asterisk' (103).
Adding new user `asterisk' (103) with group `asterisk'.
The home directory `/var/lib/asterisk' already exists.  Not copying from
`/etc/skel'
adduser: Warning: that home directory does not belong to the user you
are currently creating
+ for group in dialout audio
....

 I think that another package already create this dir...

2) And for this first time of the install I see this:

....
 + invoke-rc.d asterisk restart
invoke-rc.d: unknown initscript, /etc/init.d/asterisk not found.
+ true

Setting up asterisk-sounds-main (1.2.10.dfsg-1.dapper.2078) ...
Setting up asterisk-classic (1.2.10.dfsg-1.dapper.2078) ...
Setting up asterisk (1.2.10.dfsg-1.dapper.2078) ...
Asterisk not yet configured. Edit /etc/default/asterisk first.

 But if I run `dpkg-reconfigure asterisk-config'...:

# dpkg-reconfigure asterisk-config
....
+ chown -R
asterisk.asterisk /var/log/asterisk /var/run/asterisk /var/spool/asterisk /var/lib/asterisk /etc/asterisk
+ invoke-rc.d asterisk restart
Asterisk not yet configured. Edit /etc/default/asterisk first.

3) When I purge "asterisk*" packages, the spool dir remains in
the /var/spool/asterisk without owner, but /var/run/asterisk and other
are removed correctly.

 I think this happens because the /var/run/asterisk is installed by
"dh_installdirs var/run/asterisk" in debian/rules
and /var/spool/asterisk and others are created/managed by asterisk_fix
script, so, I must take care about it. It's right?!

 The asterisk_fix is the best way of doing this stuffs?!

PS.: Sorry about my spell errors... I'm in pt_BR domain...  :-P

Att,
Thiago





More information about the Pkg-voip-maintainers mailing list