Sun Microsystems Laboratories Experimental Stuff [Asterisk-on-solaris] SMF script

[Asterisk-on-solaris] SMF script

asterisk-on-solaris@experimentalstuff.com asterisk-on-solaris@experimentalstuff.com
Wed, 27 Sep 2006 09:41:41 -0600


------=_Part_27291_22133461.1159371701264
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

If thats true, then maybe a quick ztcfg at the start of the asterisk start
script wouldn't be horrible. It can run more than once (I think without
harm), and would probably be good to have a "update_zaptel()" function that
runs when someone does something similar to "svcadm restart asterisk" (if -x
/opt/zaptel/sbin/ztcfg ..) anyhow.

I thought you were modload(1M)-ing or similar to the Linux init script. I am
still not sure having an SMF service to load module is correct either. I
seriously want to caution against using forceload in /etc/system.
Modifications to /etc/system shouldn't be necessary unless the driver is
required for the system to boot (like filesystems or whatever). I think it
would be a better solution to more closely follow the Linux init script
where they have a "for module in $LOAD_MODULES .... modprobe $module ..."
type setup. ... Also see the -e option to modload providing ztcfg doesn't
get scared of the options :)

On 9/26/06, asterisk-on-solaris-admin@www.experimentalstuff.com <
asterisk-on-solaris-admin@www.experimentalstuff.com> wrote:
>
>  Ok, I will create an SMF script for Zaptel and add the correct
> dependencies so that it runs before the Asterisk SMF.  The sole purpose of
> this SMF would be to run the 'ztcfg' tool, if /etc/zaptel.conf exists.
>
> As for a Linux equivalent to /etc/sysconfig/zaptel, this cannot really be
> done on Solaris as Solaris want to auto-load the modules at boot.  (And
> because of this and design of the Zaptel drivers by Digium - the required
> /etc/system modifications to 'forceload')  It's not possible to mimic this
> behavior.
>
> Any additional comments or suggestions?  Or is it time to implement? :)
> -Joe
>
> asterisk-on-solaris-admin@www.experimentalstuff.com wrote:
>
> I agree, there should be an SMF service for zaptel separate from asterisk.
> I think SMF provides for optional dependencies? The trouble is, if your
> asterisk is configured to use zap channels, and you decide to disable zaptel
> for some reason, asterisk gets somewhat unhappy during the next boot. The
> other thing that it should look for is the Solaris equivalent of
> /etc/sysconfig/zaptel that would define what modules to try to load.
>
> ~tommy
>
> On 9/25/06, asterisk-on-solaris-admin@www.experimentalstuff.com <
> asterisk-on-solaris-admin@www.experimentalstuff.com> wrote:
> >
> > Joe,
> >
> > I think initialising the interfaces at boot time is the right thing to
> > do.
> >
> > The other way of doing it would be to use an additional service for
> > Zaptel that asterisk (optionally) depends on. This would be appropriate
> > if there was ever the need to use the Zaptel drivers seperately from
> > asterisk (is that likely?) and it also means that each package could be
> > entirely self contained and you could selectively disable Zaptel using
> > svcadm if needed.
> >
> > Regards,
> >
> > Lee.
> >
> > ----- Original Message -----
> > From: asterisk-on-solaris-admin
> > Sent: 09/24/2006 12:18 PM
> > To: asterisk-on-solaris@www.experimentalstuff.com
> > Subject: [Asterisk-on-solaris] SMF script
> >
> > Hello,
> >
> > I'm looking for an opinion.
> >
> > During the startup of Asterisk via the SMF script, should I look for
> > /etc/zaptel.conf and if I see it, automatically call ztcfg so that
> > everything is OK when Asterisk starts up?  Without doing this a fresh
> > boot of the system doesn't bring up the Zaptel interfaces as they aren't
> > configured yet.
> >
> > Thoughts, ideas, or suggestions welcomed,
> > -Joe
> >
> > _______________________________________________
> > Asterisk-on-solaris mailing list
> > Asterisk-on-solaris@experimentalstuff.com
> > http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris
> >
> >
> >
> > _______________________________________________
> > Asterisk-on-solaris mailing list
> > Asterisk-on-solaris@experimentalstuff.com
> > http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris
> >
>
>
>

------=_Part_27291_22133461.1159371701264
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

If thats true, then maybe a quick ztcfg at the start of the asterisk start script wouldn't be horrible. It can run more than once (I think without harm), and would probably be good to have a &quot;update_zaptel()&quot; function that runs when someone does something similar to &quot;svcadm restart asterisk&quot; (if -x /opt/zaptel/sbin/ztcfg ..) anyhow.
<br><br>I thought you were modload(1M)-ing or similar to the Linux init script. I am still not sure having an SMF service to load module is correct either. I seriously want to caution against using forceload in /etc/system. Modifications to /etc/system shouldn't be necessary unless the driver is required for the system to boot (like filesystems or whatever). I think it would be a better solution to more closely follow the Linux init script where they have a &quot;for module in $LOAD_MODULES .... modprobe $module ...&quot; type setup. ... Also see the -e option to modload providing ztcfg doesn't get scared of the options :)
<br><br><div><span class="gmail_quote">On 9/26/06, <b class="gmail_sendername"><a href="mailto:asterisk-on-solaris-admin@www.experimentalstuff.com">asterisk-on-solaris-admin@www.experimentalstuff.com</a></b> &lt;<a href="mailto:asterisk-on-solaris-admin@www.experimentalstuff.com">
asterisk-on-solaris-admin@www.experimentalstuff.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  

<div bgcolor="#ffffff" text="#000000">
Ok, I will create an SMF script for Zaptel and add the correct
dependencies so that it runs before the Asterisk SMF.&nbsp; The sole purpose
of this SMF would be to run the 'ztcfg' tool, if /etc/zaptel.conf
exists.<br>
<br>
As for a Linux equivalent to /etc/sysconfig/zaptel, this cannot really
be done on Solaris as Solaris want to auto-load the modules at boot.&nbsp;
(And because of this and design of the Zaptel drivers by Digium - the
required /etc/system modifications to 'forceload')&nbsp; It's not possible
to mimic this behavior.<br>
<br>
Any additional comments or suggestions?&nbsp; Or is it time to implement? :)<br>
-Joe<div><span class="e" id="q_10deca65a48476da_1"><br>
<br>
<a href="mailto:asterisk-on-solaris-admin@www.experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">asterisk-on-solaris-admin@www.experimentalstuff.com</a> wrote:
<blockquote cite="http://mid175752e40609261650t2cbb2e32l9e653393dd6aee34@mail.gmail.com" type="cite">I agree, there should be an SMF service for zaptel
separate from asterisk. I think SMF provides for optional dependencies?
The trouble is, if your asterisk is configured to use zap channels, and
you decide to disable zaptel for some reason, asterisk gets somewhat
unhappy during the next boot. The other thing that it should look for
is the Solaris equivalent of&nbsp; /etc/sysconfig/zaptel that would define
what modules to try to load.
  <br>
  <br>
~tommy<br>
  <br>
  <div><span class="gmail_quote">On 9/25/06, <b class="gmail_sendername"><a href="mailto:asterisk-on-solaris-admin@www.experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">asterisk-on-solaris-admin@www.experimentalstuff.com
</a></b>
&lt;<a href="mailto:asterisk-on-solaris-admin@www.experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">asterisk-on-solaris-admin@www.experimentalstuff.com</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Joe,<br>
    <br>
I think initialising the interfaces at boot time is the right thing to
do.<br>
    <br>
The other way of doing it would be to use an additional service for<br>
Zaptel that asterisk (optionally) depends on. This would be appropriate
    <br>
if there was ever the need to use the Zaptel drivers seperately from<br>
asterisk (is that likely?) and it also means that each package could be<br>
entirely self contained and you could selectively disable Zaptel using
    <br>
svcadm if needed.<br>
    <br>
Regards,<br>
    <br>
Lee.<br>
    <br>
----- Original Message -----<br>
From: asterisk-on-solaris-admin<br>
Sent: 09/24/2006 12:18 PM<br>
To: <a href="mailto:asterisk-on-solaris@www.experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">asterisk-on-solaris@www.experimentalstuff.com
    </a><br>
Subject: [Asterisk-on-solaris] SMF script<br>
    <br>
Hello,<br>
    <br>
I'm looking for an opinion.<br>
    <br>
During the startup of Asterisk via the SMF script, should I look for<br>
/etc/zaptel.conf and if I see it, automatically call ztcfg so that
    <br>
everything is OK when Asterisk starts up?&nbsp;&nbsp;Without doing this a fresh<br>
boot of the system doesn't bring up the Zaptel interfaces as they aren't<br>
configured yet.<br>
    <br>
Thoughts, ideas, or suggestions welcomed,<br>
-Joe<br>
    <br>
_______________________________________________<br>
Asterisk-on-solaris mailing list<br>
    <a href="mailto:Asterisk-on-solaris@experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Asterisk-on-solaris@experimentalstuff.com</a><br>
    <a href="http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris
</a><br>
    <br>
    <br>
    <br>
_______________________________________________<br>
Asterisk-on-solaris mailing list<br>
    <a href="mailto:Asterisk-on-solaris@experimentalstuff.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Asterisk-on-solaris@experimentalstuff.com</a><br>
    <a href="http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.experimentalstuff.com/mailman/listinfo/asterisk-on-solaris
</a><br>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
</span></div></div>


</blockquote></div><br>

------=_Part_27291_22133461.1159371701264--


This page is: http://www.experimentalstuff.com/pipermail/asterisk-on-solaris/2006-September/000033.html
Last Modified: Wed, 27 Sep 2006 15:41:03 GMT
copyright (c) 2000-2009, Sun Microsystems