Mailinglist Archive: yast-commit (595 mails)

< Previous Next >
[yast-commit] r54036 - /trunk/nfs-client/src/ui.ycp
  • From: kmachalkova@xxxxxxxxxxxxxxxx
  • Date: Wed, 10 Dec 2008 15:22:15 -0000
  • Message-id: <20081210152215.39E96B54DF@xxxxxxxxxxxxxxxx>
Author: kmachalkova
Date: Wed Dec 10 16:22:14 2008
New Revision: 54036

URL: http://svn.opensuse.org/viewcvs/yast?rev=54036&view=rev
Log:
Show an informative pop-up that the firewall
is running and therefore no shared dirs were
found (#450056)

Modified:
trunk/nfs-client/src/ui.ycp

Modified: trunk/nfs-client/src/ui.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/ui.ycp?rev=54036&r1=54035&r2=54036&view=diff
==============================================================================
--- trunk/nfs-client/src/ui.ycp (original)
+++ trunk/nfs-client/src/ui.ycp Wed Dec 10 16:22:14 2008
@@ -28,6 +28,7 @@
import "Label";
import "Nfs";
import "Popup";
+ import "SuSEFirewall";
import "Wizard";
include "nfs/routines.ycp";

@@ -276,25 +277,46 @@
{
//newer, shinier, better rpcinfo from rpcbind (#450056)
string prog_name = "/sbin/rpcinfo";
+ string delim = "";

- //fallback from glibc
+ //fallback from glibc (uses different field separators, grr
:( )
if( !FileUtils::Exists(prog_name) )
+ {
prog_name = "/usr/sbin/rpcinfo";
+ delim = "-d ' ' ";
+ }

// label message
UI::OpenDialog(`Label(_("Scanning for hosts on this
LAN...")));
// #71064
// this works also if ICMP broadcasts are ignored
- string cmd = prog_name + " -b mountd 1 | cut -d ' ' -f 2 |
sort -u";
+ string cmd = prog_name + " -b mountd 1 | cut " + delim +
"-f 2 | sort -u";
map out = (map) SCR::Execute (.target.bash_output, cmd);
hosts = filter (string s, splitstring (out["stdout"]:"",
"\n"), ``( s != ""));
UI::CloseDialog();
+
}
- string host = ChooseHostName(hosts);
- if (host != nil)
+ if( hosts == [] || hosts == nil )
{
- UI::ChangeWidget(`id(`serverent), `Value, host);
- }
+ //Translators: 1st part of error message
+ string error_msg = _("No NFS server has been found on your
network.");
+
+ if ( SuSEFirewall::GetStartService() )
+ {
+ //Translators: 2nd part of error message (1st one is
'No nfs servers have been found ...)
+ error_msg = error_msg + _("\nThis could be caused by a
running SuSEfirewall2,
+which probably blocks the network scanning.");
+ }
+ Report::Error(error_msg);
+ }
+ else
+ {
+ string host = ChooseHostName(hosts);
+ if (host != nil)
+ {
+ UI::ChangeWidget(`id(`serverent), `Value, host);
+ }
+ }
}
else if (ret == `pathent_list)
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages