[yast-commit] r54053 - /trunk/storage/storage/src/include/ep-nfs.ycp
![](https://seccdn.libravatar.org/avatar/d95f774280866d45941b1365718208ff.jpg?s=120&d=mm&r=g)
Author: kmachalkova
Date: Thu Dec 11 15:08:51 2008
New Revision: 54053
URL: http://svn.opensuse.org/viewcvs/yast?rev=54053&view=rev
Log:
If the test mount of NFS share fails, ask the user
whether to add it anyway (#450060)
Modified:
trunk/storage/storage/src/include/ep-nfs.ycp
Modified: trunk/storage/storage/src/include/ep-nfs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-nfs.ycp?rev=54053&r1=54052&r2=54053&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-nfs.ycp (original)
+++ trunk/storage/storage/src/include/ep-nfs.ycp Thu Dec 11 15:08:51 2008
@@ -116,13 +116,18 @@
if ( sizeK <= 0)
{
- Popup::Error( sformat( _("Test mount of NFS share '%1' failed.\nCheck that remote server is accesible and try again."), entry["device"]:"") );
- WFM::CallFunction("nfs-client4part", [ "FromStorage", $[ "shares" : nfs_list] ] );
- }
- else
- {
- Storage::AddNfsVolume( entry["device"]:"", entry["fstopt"]:"", sizeK, entry["mount"]:"");
+ //rollback only if user does not want to save (#450060)
+ //the mount might fail later if the errors are not corrected, but the user has been warned
+ if ( !Popup::YesNo( sformat( _("Test mount of NFS share '%1' failed.\nSave it anyway?"), entry["device"]:"")) )
+ {
+ WFM::CallFunction("nfs-client4part", [ "FromStorage", $[ "shares" : nfs_list] ] );
+ return;
+ }
+ //this really sucks - but libstorage returns negative integers (error code) instead of
+ //real size - Perl then wants to die in addNfsVolume call
+ sizeK = 0;
}
+ Storage::AddNfsVolume( entry["device"]:"", entry["fstopt"]:"", sizeK, entry["mount"]:"");
}
void EditShare( map
participants (1)
-
kmachalkova@svn.opensuse.org