From: Michael Tremer Date: Sun, 16 Aug 2009 19:54:58 +0000 (+0200) Subject: ppp: Removed old dial-in scripts. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cbf78188e6e43ad86c20d5cee9285e41ddd7496;p=ipfire-3.x.git ppp: Removed old dial-in scripts. --- diff --git a/config/ppp/dialer b/config/ppp/dialer deleted file mode 100644 index 21118b147..000000000 --- a/config/ppp/dialer +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/perl -# -# SmoothWall CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The SmoothWall Team -# -# $Id: dialer,v 1.3.2.2 2005/01/26 12:23:26 riddles Exp $ -# - -use strict; -require 'CONFIG_ROOT/general-functions.pl'; - -my %pppsettings; -my %modemsettings; - -&General::readhash("${General::swroot}/ppp/settings", \%pppsettings); -&General::readhash("${General::swroot}/modem/settings", \%modemsettings); - -if ($modemsettings{'INIT'} eq '') { - $modemsettings{'INIT'} = 'AT'; } -if ($modemsettings{'HANGUP'} eq '') { - $modemsettings{'HANGUP'} = 'AT'; } -if ($modemsettings{'SPEAKER_ON'} eq '') { - $modemsettings{'SPEAKER_ON'} = 'AT'; } -if ($modemsettings{'SPEAKER_OFF'} eq '') { - $modemsettings{'SPEAKER_OFF'} = 'AT'; } -if ($modemsettings{'TONE_DIAL'} eq '') { - $modemsettings{'TONE_DIAL'} = 'ATD'; } -if ($modemsettings{'PULSE_DIAL'} eq '') { - $modemsettings{'PULSE_DIAL'} = 'ATD'; } - -my $telephone = $pppsettings{'TELEPHONE'}; -my $username = $pppsettings{'USERNAME'}; -my $password = $pppsettings{'PASSWORD'}; - -my ($loginscript, $speaker, $dial, $btfudge); - -if ($pppsettings{'AUTH'} eq 'standard-login-script') { - $loginscript = 'standardloginscript'; } -elsif ($pppsettings{'AUTH'} eq 'demon-login-script') { - $loginscript = 'demonloginscript'; } -else { - $loginscript = $pppsettings{'LOGINSCRIPT'}; } -if ($pppsettings{'SPEAKER'} eq 'on') { - $speaker = $modemsettings{'SPEAKER_ON'}; } -else { - $speaker = $modemsettings{'SPEAKER_OFF'}; } -if ($pppsettings{'DIALMODE'} eq 'T') { - $dial = $modemsettings{'TONE_DIAL'} } -else { - $dial = $modemsettings{'PULSE_DIAL'} } -if ($pppsettings{'SENDCR'} eq 'off') { - $btfudge = '\\c'; } -else { - $btfudge = ''; } - -unlink('/var/log/connect.log'); - -my $com = "/usr/sbin/chat -v -r /var/log/connect.log \ - TIMEOUT 3 \ - REPORT CONNECT \ - ABORT '\\nBUSY\\r' \ - ABORT '\\nNO ANSWER\\r' \ - ABORT '\\nRINGING\\r\\n\\r\\nRINGING\\r' \ - ABORT '\\nNO CARRIER\\r' \ - '' '$modemsettings{'INIT'}' \ - OK '$modemsettings{'HANGUP'}' \ - OK '$speaker' \ - TIMEOUT '$modemsettings{'TIMEOUT'}' \ - OK '${dial}${telephone}' \ - CONNECT '${btfudge}' "; - -if ($loginscript) -{ - if (open(FILE, "/etc/ppp/${loginscript}")) - { - while () { - $com = "$com $_ "; } - close FILE; - } - $com =~ s/USERNAME/$username/; - $com =~ s/PASSWORD/$password/; -} - -$com =~ s/\n//g; - -exec $com; diff --git a/config/ppp/ioptions b/config/ppp/ioptions deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/ppp/ip-down b/config/ppp/ip-down deleted file mode 100644 index c7bbdbf4e..000000000 --- a/config/ppp/ip-down +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### - -. /etc/sysconfig/rc -. $rc_functions - -eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings) - -rm -f /var/ipfire/red/active - -run_subdir ${rc_base}/init.d/networking/red.down/ - -[ -e "/var/ipfire/ppp/nobeeps" ] || /etc/rc.d/init.d/beep down - -[ -e "/var/ipfire/red/keepconnected" ] && \ - /etc/rc.d/init.d/connectd reconnect & diff --git a/config/ppp/ip-up b/config/ppp/ip-up deleted file mode 100644 index 1f24658dd..000000000 --- a/config/ppp/ip-up +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### - -. /etc/sysconfig/rc -. $rc_functions - -PRIMARY_DNS=$DNS1 -SECONDARY_DNS=$DNS2 - -eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings) - -if [ "$DNS" == "Automatic" ]; then - if [ "$TYPE" == "isdn" ]; then - echo -n "$MS_DNS1" > /var/ipfire/red/dns1 - echo -n "$MS_DNS2" > /var/ipfire/red/dns2 - else - echo -n "$PRIMARY_DNS" > /var/ipfire/red/dns1 - echo -n "$SECONDARY_DNS" > /var/ipfire/red/dns2 - fi -else - echo -n "$DNS1" > /var/ipfire/red/dns1 - echo -n "$DNS2" > /var/ipfire/red/dns2 -fi - -echo -n "$1" > /var/ipfire/red/iface -echo -n "$4" > /var/ipfire/red/local-ipaddress -echo -n "$5" > /var/ipfire/red/remote-ipaddress - -touch /var/ipfire/red/active - -run_subdir ${rc_base}/init.d/networking/red.up/ - -[ -e "/var/ipfire/ppp/nobeeps" ] || /etc/rc.d/init.d/beep up diff --git a/config/ppp/options b/config/ppp/options deleted file mode 100644 index 2feb804cf..000000000 --- a/config/ppp/options +++ /dev/null @@ -1,2 +0,0 @@ -linkname ipfire -noauth diff --git a/lfs/ppp b/lfs/ppp index 0e0ad7fa3..24edd0528 100644 --- a/lfs/ppp +++ b/lfs/ppp @@ -135,7 +135,6 @@ $(OBJECT): $(objects) sed 's%CONFIG_ROOT%$(CONFIG_ROOT)%g' $$i > /etc/ppp/`basename $$i`; \ fi; \ done - chmod 755 /etc/ppp/{dialer,ip-up,ip-down} touch /etc/ppp/secrets chmod -v 600 /etc/ppp/secrets