hi!
I try to setup a VPN with PPP over SSH. A script is used to establish the
connection which works fine.
However, I tried to use diald to establish the link on demand. The problem
is that the device is not known before the connection only after the first
pppd is started. The "pty-redir" program is used to start ssh and redirects
the ssh output to some pty, which name is given on stderr.
however, diald wants its device before the connection. is there any way to
solve this issue? maybe through redirecting the output to a fixed pty which
may be used by diald?
any hints welcome!
here is the used script:
/sbin/pty-redir /usr/bin/ssh -t $MASTER sudo /usr/sbin/pppd
${MASTERIP}:${SLAVEIP} debug> /tmp/device
TTYNAME=`cat /tmp/device`
echo tty is $TTYNAME
sleep 10s
if [ ! -z $TTYNAME ]
then
sudo /usr/sbin/pppd $TTYNAME ${SLAVEIP}:${MASTERIP} passive debug &
else
echo FAILED
fi
sleep 5s
ssh $MASTER sudo /sbin/route add -net $SLAVENET netmask $SLAVEMASK gw
$SLAVEIP
Mike Gerber
Leitwerk GmbH
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]