From 5a2d6079eba1c7e2a9479cb10d714b5a97bbfe4f Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Tue, 3 Aug 2010 13:28:53 +0400 Subject: initiating work on accel-pptpd, replacement of modified poptop --- pptpd-1.3.3/debian/pptpdconfig.pl | 81 --------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 pptpd-1.3.3/debian/pptpdconfig.pl (limited to 'pptpd-1.3.3/debian/pptpdconfig.pl') diff --git a/pptpd-1.3.3/debian/pptpdconfig.pl b/pptpd-1.3.3/debian/pptpdconfig.pl deleted file mode 100644 index 9d0452a..0000000 --- a/pptpd-1.3.3/debian/pptpdconfig.pl +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -w -use strict; - -use Debian::DebConf::Client::ConfModule ':all'; - -&pptpd("/etc/pptpd.conf", get("pptpd/localip"), get("pptpd/remoteip")); -exit 0; - -sub pptpd ($$$) { - - my $line; # eine Zeile von IN - my $xxx; - my @lines; - my $count; - my $filename; - my $localIp; - my $remoteIp; - my $spaces; - my $foundlocal=0; - my $foundremote=0; - my $IDString="# generated by pptpdconfig"; - - $filename=shift; - $localIp=shift; - $remoteIp=shift; - print("Configuring pptpd to use localip(s) $localIp and remoteip(s) "); - print("$remoteIp ...\n"); - - open(IN, "<$filename") || die("$filename not found.\n"); - @lines=; - - open(OUT, ">${filename}.old"); - print OUT @lines; - close OUT; - - $count=0; - while ($count<=$#lines) - { - $line=$lines[$count]; - if ($line=~/^\s*localip/) { - if ($line=~/$IDString/) - { - ($spaces)=($line=~/^(\s*)\S*.*/); - $lines[$count]="${spaces}localip $localIp $IDString\n"; - $foundlocal=1; - } - else - { - $lines[$count]="# removed by pptpdconfig --- ".$lines[$count]."\n"; - } - } - - if ($line=~/^\s*remoteip/) { - if ($line=~/$IDString/) - { - ($spaces)=($line=~/^(\s*)\S*.*/); - $lines[$count]="${spaces}remoteip $remoteIp $IDString\n"; - $foundremote=1; - } - else - { - $lines[$count]="# removed by pptpdconfig --- ".$lines[$count]."\n"; - } - } - $count++; - } - if ($foundlocal==0) - { - push(@lines, "localip $localIp $IDString\n"); - } - if ($foundremote==0) - { - push(@lines, "remoteip $remoteIp $IDString\n"); - } - close IN; - print("done\n"); - - open(OUT, ">$filename"); - print OUT @lines; - close OUT; -} -- cgit v1.2.3