]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - html/cgi-bin/dial.cgi
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/teissler/ipfire-2.x.git] / html / cgi-bin / dial.cgi
CommitLineData
cd1a2927
MT
1#!/usr/bin/perl\r
2#\r
3# SmoothWall CGIs\r
4#\r
5# This code is distributed under the terms of the GPL\r
6#\r
7# (c) The SmoothWall Team\r
8#\r
9# $Id: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $\r
10#\r
11\r
12use strict;\r
13\r
14# enable only the following on debugging purpose\r
15#use warnings;\r
16#use CGI::Carp 'fatalsToBrowser';\r
17\r
18require 'CONFIG_ROOT/general-functions.pl';\r
19require "${General::swroot}/lang.pl";\r
20require "${General::swroot}/header.pl";\r
21\r
22my %cgiparams=();\r
23\r
24$cgiparams{'ACTION'} = '';\r
25&Header::getcgihash(\%cgiparams);\r
26\r
27if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) {\r
28 system('/etc/rc.d/rc.red','start') == 0\r
29 or &General::log("Dial failed: $?"); }\r
30elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) {\r
31 system('/etc/rc.d/rc.red','stop') == 0\r
32 or &General::log("Hangup failed: $?"); }\r
33sleep 1;\r
34\r
35print "Status: 302 Moved\nLocation: /cgi-bin/index.cgi\n\n";\r