X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fdial.cgi;h=7751fa45d78af4e3328b9b722c3906fa4ac26534;hp=88f7bad3cd397963be68b5c675f72f014e7394a5;hb=ac1cfefab236b73ed52909e14f43eaffc8d6914e;hpb=7ac38dc92777a4a9f3b0d6151befe8f446e2a031 diff --git a/html/cgi-bin/dial.cgi b/html/cgi-bin/dial.cgi index 88f7bad3cd..7751fa45d7 100644 --- a/html/cgi-bin/dial.cgi +++ b/html/cgi-bin/dial.cgi @@ -1,35 +1,35 @@ -#!/usr/bin/perl -# -# SmoothWall CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The SmoothWall Team -# -# $Id: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $ -# - -use strict; - -# enable only the following on debugging purpose -#use warnings; -#use CGI::Carp 'fatalsToBrowser'; - -require 'CONFIG_ROOT/general-functions.pl'; -require "${General::swroot}/lang.pl"; -require "${General::swroot}/header.pl"; - -my %cgiparams=(); - -$cgiparams{'ACTION'} = ''; -&Header::getcgihash(\%cgiparams); - -if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) { - system('/etc/rc.d/rc.red','start') == 0 - or &General::log("Dial failed: $?"); } -elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) { - system('/etc/rc.d/rc.red','stop') == 0 - or &General::log("Hangup failed: $?"); } -sleep 1; - -print "Status: 302 Moved\nLocation: /cgi-bin/index.cgi\n\n"; +#!/usr/bin/perl +# +# SmoothWall CGIs +# +# This code is distributed under the terms of the GPL +# +# (c) The SmoothWall Team +# +# $Id: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $ +# + +use strict; + +# enable only the following on debugging purpose +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; + +require 'CONFIG_ROOT/general-functions.pl'; +require "${General::swroot}/lang.pl"; +require "${General::swroot}/header.pl"; + +my %cgiparams=(); + +$cgiparams{'ACTION'} = ''; +&Header::getcgihash(\%cgiparams); + +if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) { + system('/etc/rc.d/rc.red','start') == 0 + or &General::log("Dial failed: $?"); } +elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) { + system('/etc/rc.d/rc.red','stop') == 0 + or &General::log("Hangup failed: $?"); } +sleep 1; + +print "Status: 302 Moved\nLocation: /cgi-bin/index.cgi\n\n";