Iam new in thes Forum, because its my first time CentOS.
![Smile :-)](./images/smilies/icon_e_smile.gif)
My problem is, when a l2tp connections getting up as pppX interface the server has to run a Script.
I testing the follow things.
at the end of: /etc/sysconfig/network-scripts/ifup-post:
if [ -x /sbin/ifup-script ]; then
echo ${REALDEVICE} ${IPADDR} > /tmp/ifup.log
/sbin/ifup-script ${REALDEVICE} ${IPADDR}
fi
at the end of: /etc/sysconfig/network-scripts/ifup-ppp:
if [ -x /sbin/ifup-script ]; then
echo ${REALDEVICE} ${IPADDR} > /tmp/ifup.log
/sbin/ifup-script ${REALDEVICE} ${IPADDR}
fi
/sbin/ifup-script:
#!/usr/bin/perl
$device = $ARGV[0] or die;
$remip = $ARGV[1] or die;
$device =~ /^ppp(\d+)$/ or die;
($network,$ip) = $remip =~ /^192\.168\.(\d+)\.(\d+)$/ or die;
$ip = $ip - 1;
$network = "192.168.$network.$ip/26";
system( "/sbin/route add -net $network dev $device" );
My problem ist, wenn a pppX "interface" comes up, I found nothing in the logs.
When I reboot the whole system, I only found the information about eth1 and the correct IP-Address of eth1.
But noting about eth0 and the pppX connections.
So I think the script doenst run. Because why, were I have to put in the Lines, to start the script correct?
Thanks für your Support.
Best reguards.