HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Contributing an init script for faxgetty



Thanks for the comment.

I am doing a cluster with Gentoo Linux. I am using DRBD as the shared
partition and /var/spool/fax  is on the shared partiotin and it can
only be mounted on 1 pc. So if faxgetty is running on the pc where the
drbd partition is not mounted it'll get "respawn to fast" errors.

Either way I was looking for a robust script that starts faxgetty from
within the hylafax init script. I'll check out this debian init script
and see if I can copy/paste enough of it on the gentoo one.

thanks.

On 2/26/07, Aidan Van Dyk <aidan@xxxxxxxxxxx> wrote:
* George H <george.dma@xxxxxxxxx> [070226 10:02]:
> Hi,
>
> I've gotten hylafax working really well (thanks to the help from this
> list) and since I need it running on a cluster of PCs I can't have the
> faxgetty process being run from  /etc/inittab.

I'm not sure why not?  If you're building a cluster, don't they all have
to be running?

> Found a bash script someone wrote to do this but it was too primitive
> and some portions didn't work with me. So I re-wrote most of it to
> work. If you use this you'd need to install  killproc program.
>
> This is good cos you can do /etc/init.d/faxgetty {start | stop | status}
> Anyone is free to use it and/or make it better. So far I hardcoded the
> /dev/ttyS0 inside it to suit my needs. If someone can make it better
> and parameterize it or make it get the device from
> /var/spool/fax/config.ttyS0 or something, that'd be cool (me not much
> of a scripter).

If you're using Debian, they have a much more complete solution in their
HylaFAX init scripts.  It actually starts/stops faxgetty's when the rest
of HylaFAX is started/stopped.  Here's "part" of it:

      cd ${HYLAFAX_HOME}/etc
      devices="`echo_fax_devices`"
      if [ ${USE_FAXGETTY} = "yes" ]; then
        log_progress_msg "faxgetty"
        for device in $devices none; do
          [ "$device" = none ] && continue
          ${FAXGETTY} `echo $device | cut -d . -f 2` >/dev/null 2>&1 </dev/null &
        done
      elif [ ${USE_FAXGETTY} != "init" ]; then
        log_progress_msg "faxmodem"
        for device in $devices none; do
          [ "$device" = none ] && continue
          ${FAXMODEM} `echo $device | cut -d . -f 2` >/dev/null 2>&1 </dev/null &
        done
      fi
      # do nothing for "init"

The official Debian packages are very well done and complete.  If you're
building a cluster and not using Debian, I would recommend switching ;-)

If that's not an option, you can see the Debian packages at
packages.debian.org.

a.

--
Aidan Van Dyk                                             Create like a god,
aidan@xxxxxxxxxxx                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFF4vocuVxNPsxNPScRAqZUAJwPc2HZiofmRx1TTdeICKQ5pljH7QCghQ6I
Tcy4FxEBOrTYLYnQmIe4IUk=
=kWt4
-----END PGP SIGNATURE-----




--
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
"If I were a roman statue, I'd be made alabastard"
--
George H
george.dma@xxxxxxxxx

____________________ HylaFAX(tm) Users Mailing List _______________________
 To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
 *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions