summaryrefslogtreecommitdiff
path: root/network.pl.in
diff options
context:
space:
mode:
authorunammx <unammx>2001-07-16 06:13:34 +0000
committerunammx <unammx>2001-07-16 06:13:34 +0000
commitc316c80feb3131fdbc52ea67c794cc4baf60c8a4 (patch)
treef6ec4e889a4dfd6a71c5c5bf68de30b1b0e2a0f3 /network.pl.in
parentf967f89e5f892dc421e68983815b6b3ef7fa3662 (diff)
backend:
Sat Jul 14 11:54:50 2001 Arturo Espinosa Aldama <arturo@ximian.com> * report.pl.in (xst_report): New warning "platform_no_table", used now in all backends when no table for the detected dist is available (shouldn't happen, but typos happen). * network.pl.in (xst_network_debian_woody_set_auto): Removed debian-potato compatibility, because noauto is not compatible with auto stanzas. (xst_network_debian_woody_get_auto): same. Fri Jul 13 14:58:00 2001 Arturo Espinosa Aldama <arturo@ximian.com> * general.pl.in (xst_run_directive): Flush debug files after every run directive. * debug.pl.in (xst_debug_close_all): Function to make the debug files close (and so, flush). * network.pl.in (xst_network_interface_set): Maybe I don't understand myself, but don't force interface activation. (xst_network_ensure_loopback_interface): Add update_dns property to default loopback prefs. * xml.pl.in (xst_xml_read_stdin): Last if no more input is available. This fixes the tool waiting for the end of request string when using a file as stdin. (backend --set < in.xml). * network.pl.in (xst_network_set_ppp_options_re): if you found the matching line, last. (xst_network_set_ppp_options_unsup): These functions are hacky. Take the unsupported options and format them one by line. Don't chomp lines: this corrupted the file. src/network: Fri Jul 13 19:10:59 2001 Arturo Espinosa Aldama <arturo@ximian.com> * main.c (update_notebook_complexity): Return trivialy if hosts container has no page, because that could happen if the tool starts in advanced mode. * connection.c (connection_updatedns_supported): Tell if the connection can handle the updatedns tag. (connection_save_to_node): If it has support, then save the updatedns node. (on_connection_ok_clicked): Only connection_config_save if cxn->modified, making OK button not highlight Apply if no changes were made. src/users: Sat Jul 14 12:04:31 2001 Arturo Espinosa Aldama <arturo@ximian.com> * user-account-editor.c (ok_clicked): Only user_account_save if the account's GUI data has been modified. * user_settings.c (user_account_connect_signals): Changed code to a big table. Some widgets are connected to "clicked" or "insert-text" to flag if the gui data has been modified. (user_account_set_modified): Callback that sets this. (user_account_gui_setup): Disable allow_mofify so that the modify flag is not set when filling the dialog in. src/common: Fri Jul 13 19:43:37 2001 Arturo Espinosa Aldama <arturo@ximian.com> * xst-tool.c (xst_tool_kill_backend): Run "end" directive with "Closing tool" sign. (xst_tool_run_get_directive): Now you can set what sign will appear on the report window. (xst_tool_run_set_directive): same. (xst_tool_load): Send the usual label. (xst_tool_save): Same. Thu Jul 12 12:22:56 2001 Arturo Espinosa Aldama <arturo@ximian.com> * xst-ui.c (container_get_label_string): Convenience function. (get_list_item_by_name): Shrinked, improved style. (xst_ui_option_menu_set_selected_string): Avoids warning: Check if the active menu item is the one we want to set. * xst-report-line.c (xst_report_line_new_from_string): Better warning. * xst-tool.c (xst_tool_read_xml_from_backend): After reading the reports, proceed to read the returning XML from the backend, until the end of request string appears. (xst_tool_run_get_directive): Use the above function now. (xst_tool_run_set_directive): Use it too, to consume the end of request string, and now return pointer to parsed XML, if one was delivered by the backend.
Diffstat (limited to 'network.pl.in')
-rw-r--r--network.pl.in35
1 files changed, 13 insertions, 22 deletions
diff --git a/network.pl.in b/network.pl.in
index 5bf8398..f3db7dd 100644
--- a/network.pl.in
+++ b/network.pl.in
@@ -1239,7 +1239,7 @@ sub xst_network_interface_set
$values_hash, $old_hash);
# if success saving the settings for the interface, set up immediatly.
- &$proc ($values_hash, $old_hash, $$values_hash{"enabled"}, 1) if !$res;
+ &$proc ($values_hash, $old_hash, $$values_hash{"enabled"}, 0) if !$res;
&xst_report_leave ();
@@ -1357,6 +1357,7 @@ sub xst_network_set_ppp_options_re
{
$line = "$value\n";
$replaced = 1;
+ last;
}
$line = $pre_space . $line . $post_comment . "\n";
@@ -1400,7 +1401,7 @@ sub xst_network_get_ppp_options_unsup
GET_LINE: while (($line = &xst_parse_chomp_line_hash_comment ($fd)) != -1)
{
$_ = $$line;
- next if /^$/;
+ next if /^[ \t]*$/;
foreach $re (@known_options)
{
@@ -1434,7 +1435,6 @@ sub xst_network_set_ppp_options_unsup
GET_LINE: foreach $line (@$buff)
{
$pre_space = $post_comment = "";
- chomp $line;
$pre_space = $1 if $line =~ s/^([ \t]+)//;
$post_comment = $1 if $line =~ s/([ \t]*\#.*)//;
@@ -1443,8 +1443,10 @@ sub xst_network_set_ppp_options_unsup
next GET_LINE if $line =~ /^$re/;
}
$line = $pre_space . $post_comment;
+ $line = "" if $line =~ /^[ \t]*$/;
}
+ $value =~ s/[ \t]+([^0-9])/\n\1/g;
push @$buff, $value . "\n";
&xst_file_buffer_clean ($buff);
@@ -1670,25 +1672,13 @@ sub xst_network_debian_woody_get_auto
{
my ($file, $iface) = @_;
- return 1 if &xst_network_debian_woody_get_auto_by_stanza ($file, $iface);
-
- # Couldn't get auto param through auto stanzas, revert to potato method.
- return &xst_parse_interfaces_option_kw ($file, $iface, "noauto");
+ return &xst_network_debian_woody_get_auto_by_stanza ($file, $iface);
}
sub xst_network_debian_woody_set_auto
{
my ($file, $iface, $value) = @_;
-
- if (&xst_parse_interfaces_option_kw ($file, $iface, "noauto"))
- {
- # Potato method. We keep compatible.
- return &xst_replace_interfaces_option_kw_not ($file, $iface, "noauto", $value);
- }
-
- my ($buff, $line_no, $stanza);
- my ($pre_space, $line, $line_arr);
- my ($found);
+ my ($buff, $line_no, $found);
$buff = &xst_file_buffer_load ($file);
&xst_file_buffer_join_lines ($buff);
@@ -1768,7 +1758,8 @@ sub xst_network_ensure_loopback_interface
"broadcast" => "127.255.255.255",
"network" => "127.0.0.0",
"bootproto" => "none",
- "enabled" => 1
+ "enabled" => 1,
+ "update_dns" => 0
);
$$interface{$dev} = \%iface;
@@ -2005,7 +1996,7 @@ sub xst_network_get_parse_table
my $dist = $dist_map{$xst_dist};
return %{$dist_tables{$dist}} if $dist;
- # FIXME: This is a fatal error, and should make us bail.
+ &xst_report ("platform_no_table", $xst_dist);
return undef;
}
@@ -2209,7 +2200,7 @@ sub xst_network_get_interfaces_parse_table
my $dist = $dist_map{$xst_dist};
return %{$dist_tables{$dist}} if $dist;
- # FIXME: This is a fatal error, and should make us bail.
+ &xst_report ("platform_no_table", $xst_dist);
return undef;
}
@@ -2384,7 +2375,7 @@ sub xst_network_get_replace_table
my $dist = $dist_map{$xst_dist};
return %{$dist_tables{$dist}} if $dist;
- # FIXME: This is a fatal error, and should make us bail.
+ &xst_report ("platform_no_table", $xst_dist);
return undef;
}
@@ -2585,7 +2576,7 @@ sub xst_network_get_interface_replace_table
my $dist = $dist_map{$xst_dist};
return %{$dist_tables{$dist}} if $dist;
- # FIXME: This is a fatal error, and should make us bail.
+ &xst_report ("platform_no_table", $xst_dist);
return undef;
}