+++ /dev/null
-#!/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 (<FILE>) {
- $com = "$com $_ "; }
- close FILE;
- }
- $com =~ s/USERNAME/$username/;
- $com =~ s/PASSWORD/$password/;
-}
-
-$com =~ s/\n//g;
-
-exec $com;
+++ /dev/null
-#!/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 <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-. /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 &
+++ /dev/null
-#!/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 <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-. /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
+++ /dev/null
-linkname ipfire
-noauth
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