<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Re: Multiple CIPE interfaces on one server?
From: Basil Hussain <basil.hussain,AT,specialreserve,DOT,net>
Date: Mon, 5 Feb 2001 20:11:28 +0100
In-reply-to: <000a01c08fa0$12124360$0d00a8c0@wm.dupont.com>


>> However, I realised that probably wasn't the problem - the primary problem
>> was that of setting up my DB server to support multiple CIPE tunnels! I 
>> have one configured. How can I use two (or more)?
>> I can see no clear way of setting up two connections using the config files
>> and init script included in the RH package. I could start two CIPE daemons
>> by hand, but I need them to be started as soon as the server is running 
>> continue as long as it is up).

> Well, considering I don't use RH  so I wouldn't know how they hacked up the
> CIPE package

Basically, the RH-supplied init script takes it's main config parameters
from /etc/sysconfig/cipe as well as /etc/cipe/options. Very strange...

> normally you would start multiple interfaces like this:
> ciped-cb -o <options.file1>
> ciped-cb -o <options.file2>
> and so on..

Ah, I didn't realise that you could specify a path to a config file as an
argument. Knowing this, I have an idea. The main meat of the init script
that starts the daemon appears to be:

echo -n "Starting CIPE: "
if [ -f /var/run/ciped-cb.pid ] ; then
        echo "CIPE is already running"
        exit 1
if [ -n "$DEVICE" ] ; then
        CIPE_OPTS="${CIPE_OPTS} me=${ip}:${PORT}"
if [ -n "$PORT" -a -n "$PEER" ] ; then
        CIPE_OPTS="${CIPE_OPTS} peer=${PEER}:${PORT}"
if [ -n "$IPADDR" ] ; then
        CIPE_OPTS="${CIPE_OPTS} ipaddr=${IPADDR}"
if [ -n "$PTPADDR" ] ; then
        CIPE_OPTS="${CIPE_OPTS} ptpaddr=${PTPADDR}"
daemon ciped-cb ${CIPE_OPTS}
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ciped

Now, it seems (from my limited shell-scripting knowledge) as though it's
testing for the existence of the config parameters included earlier in the
script, and putting together a parameter string which it then starts the
daemon with.

Could anyone tell me how I could modify this so it would, for example, start
a seperate daemon for every config file it finds in a certain directory
(maybe a /etc/sysconfig/cipe dir, rather than a file)?

I imagine it would have to do some kind of directory listing and the loop
through starting daemons. That would be neat. :)


Basil Hussain (basil.hussain,AT,specialreserve,DOT,net)

<< | Thread Index | >> ]    [ << | Date Index | >> ]