[ale] permanent process

Joe Steele joe at madewell.com
Thu Apr 11 12:55:49 EDT 2002


On Thursday, April 11, 2002 6:19 AM, David Corbin wrote:
>
> I have several processes that I would like to be up "all the time"
> (maintenance excluded).  Normally, this screams "inittab" at me, but
> given then nature of the process (networking related), I don't want them
> spawned right when inittab is processed.  Any suggestions on how to
> handle this?
>
> For the record, I'm talking about pppoe (DSL), and vtun(which runs over
> the pppoe).  I've had some problems lately with pppoe "disappearing".  I
> could easily have a script that monitors and restarts, but is this the
> best way?
>

FWIW, that's what's done for slip interfaces on a RH box.  The ifup-sl 
script contains the following loop which restarts dip whenever it dies:

> while : ; do
>   echo > /var/run/sl-$DEVICE.dev
>   (logger -p daemon.info -t ifup-sl \
>     $"dip started for $DEVICE on $MODEMPORT at $LINESPEED" &)&
>   doexec /usr/sbin/dip dip-$DEVICE $DIPSCRIPT
>   if [ "$PERSIST" != "yes" -o ! -f /var/run/sl-$DEVICE.dev ] ; then
>     exit 0
>   fi
>   while [ -f /var/run/LCK..$DEVICE && killall -0 dip ] ; do
>         sleep 10
>   done
>   rm -f /var/run/sl-$DEVICE.dev
>
>   sleep $RETRYTIMEOUT || {
>     # sleep was killed
>     exit 0
>   }
> done
>

--Joe

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list