diff options
author | carlosg <carlosg> | 2004-12-01 20:30:07 +0000 |
---|---|---|
committer | carlosg <carlosg> | 2004-12-01 20:30:07 +0000 |
commit | 74d53366069c6102d56f7f1ba9f142c4c8351e53 (patch) | |
tree | 44af1a0a5879f73e285e8ca7eaca81d4c00943e8 | |
parent | 5202aebf0d5f44742898f02f675935bb8e2b0acf (diff) |
2004-12-01 Carlos Garnacho Parro <carlosg@gnome.org>
* network.pl.in: moved pppscripts creation to a generic function,
made debian use pppscript instead of wvial. s/wvsection/section/g
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | network.pl.in | 214 |
2 files changed, 115 insertions, 104 deletions
@@ -1,3 +1,8 @@ +2004-12-01 Carlos Garnacho Parro <carlosg@gnome.org> + + * network.pl.in: moved pppscripts creation to a generic function, + made debian use pppscript instead of wvial. s/wvsection/section/g + 2004-11-26 Carlos Garnacho Parro <carlosg@gnome.org> * network.pl.in (gst_network_enable_iface_with_config): little fix diff --git a/network.pl.in b/network.pl.in index f48f667..33b29b5 100644 --- a/network.pl.in +++ b/network.pl.in @@ -1153,7 +1153,7 @@ sub gst_network_dial2iface $iface{$i} = $$dial{$map{$i}} if exists $$dial{$map{$i}}; } - $iface{"file"} = $iface{"name"} = $iface{"wvsection"} = $name; + $iface{"file"} = $iface{"name"} = $iface{"section"} = $name; $iface{"update_dns"} = 1 if ($iface{"update_dns"} eq ""); $iface{"set_default_gw"} = 1 if ($iface{"set_default_gw"} eq ""); @@ -1212,7 +1212,7 @@ sub gst_network_suse70_set_ppp push @ppp_devs, $i; # This takes care of connection name changes. - $wv = $$i{"wvsection"}; + $wv = $$i{"section"}; $name = $$i{"name"}; if ($wv ne $name) @@ -1297,29 +1297,6 @@ sub gst_network_suse70_activate_ppp return 0; } -sub gst_network_slackware91_create_pppscript -{ - my ($pppscript) = @_; - my ($contents); - local *FILE; - - if (!&gst_file_exists ($pppscript)) - { - # create a template file from scratch - $contents = 'TIMEOUT 60' . "\n"; - $contents .= 'ABORT ERROR' . "\n"; - $contents .= 'ABORT BUSY' . "\n"; - $contents .= 'ABORT "NO CARRIER"' . "\n"; - $contents .= 'ABORT "NO DIALTONE"' . "\n"; - $contents .= '"" "AT&FH0"' . "\n"; - $contents .= 'OK "ATDT000000000"' . "\n"; - $contents .= 'TIMEOUT 75' . "\n"; - $contents .= 'CONNECT' . "\n"; - - &gst_file_buffer_save ($contents, $pppscript); - } -} - sub gst_network_slackware91_create_pppgo { my ($pppgo) = "/usr/sbin/ppp-go"; @@ -1385,6 +1362,35 @@ sub gst_network_set_modem_volume return &gst_replace_chat ($file, "AT([^DZ][a-z0-9&]+)", $line); } +sub gst_network_create_pppscript +{ + my ($pppscript) = @_; + my ($contents); + local *FILE; + + print "1111 $pppscript\n"; + + if (!&gst_file_exists ($pppscript)) + { + # create a template file from scratch + $contents = 'TIMEOUT 60' . "\n"; + $contents .= 'ABORT ERROR' . "\n"; + $contents .= 'ABORT BUSY' . "\n"; + $contents .= 'ABORT VOICE' . "\n"; + $contents .= 'ABORT "NO CARRIER"' . "\n"; + $contents .= 'ABORT "NO DIALTONE"' . "\n"; + $contents .= 'ABORT "NO DIAL TONE"' . "\n"; + $contents .= 'ABORT "NO ANSWER"' . "\n"; + $contents .= '"" "ATZ"' . "\n"; + $contents .= '"" "AT&FH0"' . "\n"; + $contents .= 'OK "ATDT000000000"' . "\n"; + $contents .= 'TIMEOUT 75' . "\n"; + $contents .= 'CONNECT' . "\n"; + + &gst_file_buffer_save ($contents, $pppscript); + } +} + sub gst_network_interfaces_get { my (%dist_attrib, %config_hash, %hash, %fn); @@ -2425,7 +2431,7 @@ sub gst_network_set_ppp_options_connect &gst_report_enter (); &gst_report ("network_set_ppp_connect", $file); - $ret = &gst_network_set_ppp_options_re ($file, "^connect", "connect \"/usr/bin/wvdial --chat $value\""); + $ret = &gst_network_set_ppp_options_re ($file, "^connect", "connect \"/usr/sbin/chat -v -f $value\""); &gst_report_leave (); return $ret; } @@ -4175,7 +4181,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4230,7 +4236,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4287,7 +4293,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4341,7 +4347,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4392,7 +4398,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4444,7 +4450,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -4464,8 +4470,8 @@ sub gst_network_get_interface_parse_table { INTERFACES => "/etc/network/interfaces", IFACE => "#iface#", - CHAT => "/etc/chatscripts/%wvsection%", - PPP_OPTIONS => "/etc/ppp/peers/%wvsection%", + CHAT => "/etc/chatscripts/%section%", + PPP_OPTIONS => "/etc/ppp/peers/%section%", PAP => "/etc/ppp/pap-secrets", CHAP => "/etc/ppp/chap-secrets", PUMP => "/etc/pump.conf" @@ -4482,7 +4488,7 @@ sub gst_network_get_interface_parse_table [ "broadcast", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], [ "network", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "network" ], [ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], - [ "wvsection", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "provider" ], + [ "section", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "provider" ], [ "update_dns", \&gst_network_pump_get_nodns, PUMP, "%dev%", "%bootproto%" ], [ "update_dns", \&gst_parse_kw, PPP_OPTIONS, "usepeerdns" ], # [ "dns1", \&gst_parse_trivial, "" ], # not supported. @@ -4517,11 +4523,10 @@ sub gst_network_get_interface_parse_table { INTERFACES => "/etc/network/interfaces", IFACE => "#iface#", - CHAT => "/etc/chatscripts/%wvsection%", - PPP_OPTIONS => "/etc/ppp/peers/%wvsection%", + CHAT => "/etc/chatscripts/%section%", + PPP_OPTIONS => "/etc/ppp/peers/%section%", PAP => "/etc/ppp/pap-secrets", CHAP => "/etc/ppp/chap-secrets", - PUMP => "/etc/pump.conf" }, table => [ @@ -4537,32 +4542,32 @@ sub gst_network_get_interface_parse_table [ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], [ "essid", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "wireless_essid" ], [ "key", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "wireless_key" ], - [ "wvsection", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "provider" ], - [ "update_dns", \&gst_network_pump_get_nodns, PUMP, "%dev%", "%bootproto%" ], - [ "update_dns", \&gst_parse_kw, PPP_OPTIONS, "usepeerdns" ], -# [ "dns1", \&gst_parse_trivial, "" ], # not supported. -# [ "dns2", \&gst_parse_trivial, "" ], # not supported. - [ "noauth", \&gst_parse_kw, PPP_OPTIONS, "noauth" ], - [ "mtu", \&gst_parse_split_first_str, PPP_OPTIONS, "mtu", "[ \t]+" ], - [ "mru", \&gst_parse_split_first_str, PPP_OPTIONS, "mru", "[ \t]+" ], [ "remote_address", \&gst_network_debian_parse_remote_address, [INTERFACES, IFACE]], - [ "login", \&gst_parse_split_first_str, PPP_OPTIONS, "user", "[ \t]+" ], - [ "password", \&gst_network_get_pap_passwd, PAP, "%login%" ], - [ "password", \&gst_network_get_pap_passwd, CHAP, "%login%" ], - [ "serial_port", \&gst_network_get_ppp_options_re, PPP_OPTIONS, "^(/dev/[^ \t]+)" ], - [ "serial_speed", \&gst_network_get_ppp_options_re, PPP_OPTIONS, "^([0-9]+)" ], - [ "ppp_options", \&gst_network_get_ppp_options_unsup, PPP_OPTIONS ], - [ "set_default_gw", \&gst_parse_kw, PPP_OPTIONS, "defaultroute" ], - [ "debug", \&gst_parse_kw, PPP_OPTIONS, "debug" ], - [ "persist", \&gst_parse_kw, PPP_OPTIONS, "persist" ], - [ "serial_escapechars", \&gst_parse_split_first_str, PPP_OPTIONS, "escape", "[ \t]+" ], - [ "serial_hwctl", \&gst_parse_kw, PPP_OPTIONS, "crtscts" ], - [ "phone_number", \&gst_parse_chat, CHAT, "^atd[^0-9]*([0-9, -]+)" ], + [ "section", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "provider" ], + [ "update_dns", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "usepeerdns" ]], + [ "noauth", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "noauth" ]], + [ "mtu", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_split_first_str, PPP_OPTIONS, "mtu", "[ \t]+" ]], + [ "mru", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_split_first_str, PPP_OPTIONS, "mru", "[ \t]+" ]], + [ "serial_port", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_ppp_options_re, PPP_OPTIONS, "^(/dev/[^ \t]+)" ]], + [ "serial_speed", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_ppp_options_re, PPP_OPTIONS, "^([0-9]+)" ]], + [ "login", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_ppp_options_re, PPP_OPTIONS, "^user \"(.*)\"" ]], + [ "password", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_pap_passwd, PAP, "%login%" ]], + [ "password", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_pap_passwd, CHAP, "%login%" ]], + [ "ppp_options", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_ppp_options_unsup, PPP_OPTIONS ]], + [ "set_default_gw", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "defaultroute" ]], + [ "debug", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "debug" ]], + [ "persist", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "persist" ]], + [ "serial_escapechars", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_split_first_str, PPP_OPTIONS, "escape", "[ \t]+" ]], + [ "serial_hwctl", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_kw, PPP_OPTIONS, "crtscts" ]], + [ "external_line", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_chat, CHAT, "atd[^0-9]*([0-9]*)[wW]" ]], + [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_chat, CHAT, "atd.*[ptw]([0-9, -]+)" ]], + [ "dial_command", \&gst_network_check_iface, [IFACE, "ppp", \&gst_parse_chat, CHAT, "(atd[tp])[0-9, -w]+" ]], + [ "volume", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_get_modem_volume, CHAT ]], # [ "enabled", \&gst_network_interface_active, IFACE, # \&gst_network_active_interfaces_get ], # [ "enabled", \&gst_parse_trivial, 0 ] - ] - }, + ] + }, "suse-7.0" => { @@ -4672,7 +4677,7 @@ sub gst_network_get_interface_parse_table [ "serial_port", \&gst_parse_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_parse_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_parse_sh, IFCFG, PPPOPTIONS ], -# [ "wvsection", \&gst_parse_sh, IFCFG, WVDIALSECT ], +# [ "section", \&gst_parse_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_parse_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_parse_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_parse_sh_bool, IFCFG, PERSIST ], @@ -5314,7 +5319,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5364,7 +5369,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5414,7 +5419,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5462,7 +5467,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5510,7 +5515,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5558,7 +5563,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], - [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], + [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5577,8 +5582,8 @@ sub gst_network_get_interface_replace_table { INTERFACES => "/etc/network/interfaces", IFACE => "#iface#", - CHAT => "/etc/chatscripts/%wvsection%", - PPP_OPTIONS => "/etc/ppp/peers/%wvsection%", + CHAT => "/etc/chatscripts/%section%", + PPP_OPTIONS => "/etc/ppp/peers/%section%", PAP => "/etc/ppp/pap-secrets", CHAP => "/etc/ppp/chap-secrets", PUMP => "/etc/pump.conf" @@ -5594,7 +5599,7 @@ sub gst_network_get_interface_replace_table [ "broadcast", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], [ "network", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "network" ], [ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], - [ "wvsection", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "provider" ], + [ "section", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "provider" ], [ "update_dns", \&gst_network_pump_set_nodns, PUMP, "%dev%", "%bootproto%" ], [ "update_dns", \&gst_replace_kw, PPP_OPTIONS, "usepeerdns" ], # not sup [ "dns1", \&gst_replace_sh, IFCFG, DNS1 ], @@ -5606,7 +5611,7 @@ sub gst_network_get_interface_replace_table [ "login", \&gst_replace_join_first_str, PPP_OPTIONS, "user", "[ \t]+" ], [ "serial_port", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^(/dev/[^ \t]+)" ], [ "serial_speed", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^([0-9]+)" ], - [ "wvsection", \&gst_network_set_ppp_options_connect, PPP_OPTIONS ], + [ "section", \&gst_network_set_ppp_options_connect, PPP_OPTIONS ], [ "ppp_options", \&gst_network_set_ppp_options_unsup, PPP_OPTIONS ], [ "set_default_gw", \&gst_replace_kw, PPP_OPTIONS, "defaultroute" ], [ "debug", \&gst_replace_kw, PPP_OPTIONS, "debug" ], @@ -5627,44 +5632,45 @@ sub gst_network_get_interface_replace_table { INTERFACES => "/etc/network/interfaces", IFACE => "#iface#", - CHAT => "/etc/chatscripts/%wvsection%", - PPP_OPTIONS => "/etc/ppp/peers/%wvsection%", + CHAT => "/etc/chatscripts/%section%", + PPP_OPTIONS => "/etc/ppp/peers/%section%", PAP => "/etc/ppp/pap-secrets", CHAP => "/etc/ppp/chap-secrets", - PUMP => "/etc/pump.conf" }, table => [ - [ "bootproto", \&gst_network_deb22_replace_bootproto, [INTERFACES, IFACE]], - [ "auto", \&gst_network_debian_woody_set_auto, [INTERFACES, IFACE]], - [ "name", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "name" ], - [ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ], - [ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], - [ "broadcast", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], - [ "network", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "network" ], - [ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], - [ "wvsection", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "provider" ], - [ "essid", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless_essid" ], - [ "key", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless_key" ], - [ "update_dns", \&gst_network_pump_set_nodns, PUMP, "%dev%", "%bootproto%" ], - [ "update_dns", \&gst_replace_kw, PPP_OPTIONS, "usepeerdns" ], - [ "noauth", \&gst_replace_kw, PPP_OPTIONS, "noauth" ], - [ "mtu", \&gst_replace_join_first_str, PPP_OPTIONS, "mtu", "[ \t]+" ], - [ "mru", \&gst_replace_join_first_str, PPP_OPTIONS, "mru", "[ \t]+" ], + [ "bootproto", \&gst_network_deb22_replace_bootproto, [INTERFACES, IFACE]], + [ "auto", \&gst_network_debian_woody_set_auto, [INTERFACES, IFACE]], + [ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ], + [ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], + [ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], + [ "essid", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless_essid" ], + [ "key", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless_key" ], + [ "section", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "provider" ], [ "remote_address", \&gst_network_debian_replace_remote_address, [INTERFACES, IFACE]], - [ "login", \&gst_replace_join_first_str, PPP_OPTIONS, "user", "[ \t]+" ], - [ "serial_port", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^(/dev/[^ \t]+)" ], - [ "serial_speed", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^([0-9]+)" ], - [ "wvsection", \&gst_network_set_ppp_options_connect, PPP_OPTIONS ], - [ "ppp_options", \&gst_network_set_ppp_options_unsup, PPP_OPTIONS ], - [ "set_default_gw", \&gst_replace_kw, PPP_OPTIONS, "defaultroute" ], - [ "debug", \&gst_replace_kw, PPP_OPTIONS, "debug" ], - [ "persist", \&gst_replace_kw, PPP_OPTIONS, "persist" ], - [ "serial_escapechars", \&gst_replace_join_first_str, PPP_OPTIONS, "escape", "[ \t]+" ], - [ "serial_hwctl", \&gst_replace_kw, PPP_OPTIONS, "crtscts" ], - [ "phone_number", \&gst_replace_chat, CHAT, "^atd[^0-9]*([0-9, -]+)" ], + # Modem stuff + [ "section", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_ppp_options_connect, PPP_OPTIONS ]], + [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_create_pppscript, CHAT ]], + [ "update_dns", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "usepeerdns" ]], + [ "noauth", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "noauth" ]], + [ "set_default_gw", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "defaultroute" ]], + [ "debug", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "debug" ]], + [ "persist", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "persist" ]], + [ "serial_hwctl", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "crtscts" ]], + [ "mtu", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_join_first_str, PPP_OPTIONS, "mtu", "[ \t]+" ]], + [ "mru", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_join_first_str, PPP_OPTIONS, "mru", "[ \t]+" ]], + [ "serial_port", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^(/dev/[^ \t]+)" ]], + [ "serial_speed", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^([0-9]+)" ]], + [ "login", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_ppp_options_re, PPP_OPTIONS, "^user \"(.*)\"", "user \"%login%\"" ]], + [ "password", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_pap_passwd, PAP, "%login%" ]], + [ "password", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_pap_passwd, CHAP, "%login%" ]], + [ "serial_escapechars", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_join_first_str, PPP_OPTIONS, "escape", "[ \t]+" ]], + [ "dial_command", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_chat, CHAT, "(atd[tp])[0-9w, -]+" ]], + [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_chat, CHAT, "atd[tp]([0-9w]+)" ]], + [ "external_line", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_chat, CHAT, "atd[tp]([0-9w, -]+)", "%external_line%W%phone_number%" ]], + [ "volume", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_set_modem_volume, CHAT ]], ] - }, + }, "suse-7.0" => { @@ -5775,7 +5781,7 @@ sub gst_network_get_interface_replace_table [ "serial_port", \&gst_replace_sh, IFCFG, MODEMPORT ], [ "serial_speed", \&gst_replace_sh, IFCFG, LINESPEED ], [ "ppp_options", \&gst_replace_sh, IFCFG, PPPOPTIONS ], -# [ "wvsection", \&gst_replace_sh, IFCFG, WVDIALSECT ], +# [ "section", \&gst_replace_sh, IFCFG, WVDIALSECT ], [ "set_default_gw", \&gst_replace_sh_bool, IFCFG, DEFROUTE ], [ "debug", \&gst_replace_sh_bool, IFCFG, DEBUG ], [ "persist", \&gst_replace_sh_bool, IFCFG, PERSIST ], @@ -5811,7 +5817,7 @@ sub gst_network_get_interface_replace_table [ "essid", \&gst_replace_wireless_opts, [ WIRELESS, IFACE ], \&gst_network_get_wireless_ifaces, ESSID ], [ "key", \&gst_replace_wireless_opts, [ WIRELESS, IFACE ], \&gst_network_get_wireless_ifaces, KEY ], # Modem stuff - [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_slackware91_create_pppscript, CHAT ]], + [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_create_pppscript, CHAT ]], [ "phone_number", \&gst_network_check_iface, [IFACE, "ppp", \&gst_network_slackware91_create_pppgo ]], [ "update_dns", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "usepeerdns" ]], [ "noauth", \&gst_network_check_iface, [IFACE, "ppp", \&gst_replace_kw, PPP_OPTIONS, "noauth" ]], |