summaryrefslogtreecommitdiff
path: root/pptpd-1.3.3/debian/pptpdconfig.pl
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-08-03 13:28:53 +0400
committerKozlov Dmitry <dima@server>2010-08-03 13:28:53 +0400
commit5a2d6079eba1c7e2a9479cb10d714b5a97bbfe4f (patch)
treee72134e47e1491580af15e3eccbba451f13fdd42 /pptpd-1.3.3/debian/pptpdconfig.pl
parentba8e1a64e75930a161afac9048e7d03b7f880644 (diff)
downloadaccel-ppp-xebd-5a2d6079eba1c7e2a9479cb10d714b5a97bbfe4f.tar.gz
accel-ppp-xebd-5a2d6079eba1c7e2a9479cb10d714b5a97bbfe4f.zip
initiating work on accel-pptpd, replacement of modified poptop
Diffstat (limited to 'pptpd-1.3.3/debian/pptpdconfig.pl')
-rw-r--r--pptpd-1.3.3/debian/pptpdconfig.pl81
1 files changed, 0 insertions, 81 deletions
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=<IN>;
-
- 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;
-}