Author: kmachalkova Date: Fri Sep 7 18:52:03 2007 New Revision: 40813 URL: http://svn.opensuse.org/viewcvs/yast?rev=40813&view=rev Log: Do not use obsolete getcfg-interface to get device name from hw description (mac address) (#308258) Modified: trunk/dhcp-server/src/DhcpServer.pm Modified: trunk/dhcp-server/src/DhcpServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/dhcp-server/src/DhcpServer.pm?rev=40813&r1=40812&r2=40813&view=diff ============================================================================== --- trunk/dhcp-server/src/DhcpServer.pm (original) +++ trunk/dhcp-server/src/DhcpServer.pm Fri Sep 7 18:52:03 2007 @@ -1455,9 +1455,9 @@ } if (! (defined ($dhcp_server) && defined($dhcp_server_fqdn))) { - # error report, %1 is server name -Report->Error (sformat(__("Cannot determine the hostname of %1."), $dhcp_server_fqdn)); - return 0; + # error report +Report->Error (__("Cannot determine hostname. LDAP-based configuration of +DHCP server will not be available.")); } # Firewall settings @@ -1543,7 +1543,10 @@ $was_configured = 0; } - $self->LdapInit ($ag_settings_ref, 0); + if ( ! $ldap_available ) + { + $self->LdapInit ($ag_settings_ref, 0); + } if ( ! $use_ldap ) { @@ -2218,26 +2221,26 @@ my $bcast = ""; my $netmask = ""; - y2milestone ("Getting information about interface $interface"); - my %out = %{SCR->Execute (".target.bash_output", - "/sbin/getcfg-interface $interface") || {}}; - if ($out{"exit"} != 0) - { - y2error ("getcfg-interface exited with code $out{\"exit\"}"); - return {}; - } - if ($out{"stdout"} eq "0") - { - y2error ("getcfg-interface returned strange interface \"0\""); - return {}; - } - my $iface = $out{"stdout"}; + #y2milestone ("Getting information about interface $interface"); + #my %out = %{SCR->Execute (".target.bash_output", + # "/sbin/getcfg-interface $interface") || {}}; + #if ($out{"exit"} != 0) + #{ + # y2error ("getcfg-interface exited with code $out{\"exit\"}"); + # return {}; + #} + #if ($out{"stdout"} eq "0") + #{ + # y2error ("getcfg-interface returned strange interface \"0\""); + # return {}; + #} + #my $iface = $out{"stdout"}; - %out = %{SCR->Execute (".target.bash_output", - "LANG=en_EN /sbin/ifconfig $iface") || {}}; + my %out = %{SCR->Execute (".target.bash_output", + "LANG=en_EN /sbin/ifconfig $interface") || {}}; if ($out{"exit"} != 0) { - y2error ("getcfg-interface exited with code $out{\"exit\"}"); + y2error ("ifconfig exited with code $out{\"exit\"}"); return {}; } @@ -2252,8 +2255,8 @@ } else { - chomp($iface); - y2warning ("ifconfig didn't return meaningful data about $iface, asking NetworkDevices"); + chomp($interface); + y2warning ("ifconfig didn't return meaningful data about $interface, asking NetworkDevices"); $ip = NetworkDevices->GetValue($interface, "IPADDR"); $bcast = NetworkDevices->GetValue($interface, "BROADCAST"); $netmask = NetworkDevices->GetValue($interface, "NETMASK"); @@ -2272,7 +2275,7 @@ } else { - y2error("Cannot get any data about $iface, it may have no configuration"); + y2error("Cannot get any data about $interface, it may have no configuration"); return {}; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org