[asterisk-dev] TELEPHONY=yes test in init scripts

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Aug 25 17:49:40 CDT 2007


Hi

The asterisk and zaptel init.d scripts test if TELEPHONY=yes . If not
they exit immediately. I wonder what is exactly the purpose that this
test serves:

The value 'yes' to the variable TELEPHONY will typically come from the
rcconf file, that is - /etc/sysconfig/zaptel or /etc/default/zaptel.
On a standard installation 'make config' will install a config file
there that also sets TELEPHONY to 'yes'.

So this test checks if we ran 'make install' but not 'make config'?
Or does it check if the system is "configured"?

Are there any values that are not sane enough that the user must set
before enabling TELEPHONY to "yes"? If so: what are they? Why can't we
provide solid defaults?


If the defaults are solid, why not just set the default of TELEPHONY=yes
in the init.d script (and still keep this variable's functionality, in
case the user wants to use it for explicitly disabling asterisk)


in the init.d script:

  # adding this:
  TELEPHONY=yes

...

  # the existing:
  . rcconf_file


In the rcconf file:

  # unrem this to disble running asterisk:
  #TELEPHONY=no

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list