summaryrefslogtreecommitdiff
path: root/network.pl.in
diff options
context:
space:
mode:
authorunammx <unammx>2001-09-18 23:14:20 +0000
committerunammx <unammx>2001-09-18 23:14:20 +0000
commitdef3a743a0f6016045a7fe685ecd514d52656a2c (patch)
tree397e8e14163e63eb52765d0fc0355649c2925970 /network.pl.in
parent2d94e25ff3de7f5005a46d4381e1e933237f2fab (diff)
2001-09-18 Arturo Espinosa Aldama <arturo@ximian.com>
* network.pl.in (xst_network_rh62_parse_bootproto): If the bootproto is unknown, report error, default to none. (xst_network_suse70_parse_bootproto): same.
Diffstat (limited to 'network.pl.in')
-rw-r--r--network.pl.in28
1 files changed, 19 insertions, 9 deletions
diff --git a/network.pl.in b/network.pl.in
index e28520a..d71efef 100644
--- a/network.pl.in
+++ b/network.pl.in
@@ -1511,16 +1511,22 @@ sub xst_network_set_ppp_options_unsup
sub xst_network_rh62_parse_bootproto
{
- my $ret;
+ my ($file, $key) = @_;
my %rh62_to_proto_name =
(
"bootp" => "bootp",
"dhcp" => "dhcp",
"none" => "none"
);
+ my $ret;
- $ret = &xst_parse_sh (@_);
-
+ $ret = &xst_parse_sh ($file, $iface);
+
+ if (!exists $rh62_to_proto_name{$ret})
+ {
+ &xst_report ("network_bootproto_unsup", $file, $ret);
+ $ret = "none";
+ }
return $rh62_to_proto_name{$ret};
}
@@ -1606,17 +1612,21 @@ sub xst_network_deb22_replace_bootproto
sub xst_network_suse70_parse_bootproto
{
my ($file, $iface) = @_;
- my ($ret, $val);
+ my ($ret);
my %suse70_to_proto_name =
(
"bootp" => "bootp",
- "dhcpclient" => "dhcp",
+ "dhcpclient" => "dhcp"
);
- $val = &xst_network_suse70_parse_iface_sh ($file, $iface, "IFCONFIG");
- $ret = $suse70_to_proto_name {$val};
- return $ret if $ret ne undef;
- return "none";
+ $ret = &xst_network_suse70_parse_iface_sh ($file, $iface, "IFCONFIG");
+ if (!exists $suse70_to_proto_name {$ret})
+ {
+ &xst_report ("network_bootproto_unsup", $iface, $ret);
+ return "none";
+ }
+
+ return $suse70_to_proto_name {$ret};
}
sub xst_network_suse70_replace_bootproto