#!/usr/local/bin/perl # edit_options.cgi # Display list of options for PPP, and show if mgetty has autoPPP mode enabled require './pap-lib.pl'; $access{'options'} || &error($text{'options_ecannot'}); &ReadParse(); &ui_print_header(undef, $text{'options_title'}, ""); $of = $config{'ppp_options'}; if ($in{'file'} =~ /^\Q$of\E\.ttyS(\d+)$/) { $tty = "ttyS$1"; print "
",&text('options_ecmd', "$config{'pppd'}"),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } # Check if the pppd is the linux one $out = `$config{'pppd'} -v 2>&1`; if ($out !~ /version\s+([0-9\.]+)/) { print "
",&text('options_epppd', "$config{'pppd'}"),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } @opts = &parse_ppp_options($in{'file'} || $of); if (!$in{'file'}) { # Check for the mgetty login config file if (!-r $config{'login_config'}) { print "
",&text('options_elogin', "$config{'login_config'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } @login = &parse_login_config(); } print "
$text{'options_desc'}
\n" if (!$in{'file'}); print "
\n"; if ($in{'file'}) { &ui_print_footer("list_mgetty.cgi", $text{'mgetty_return'}); } else { &ui_print_footer("", $text{'index_return'}); }