Author: fehr Date: Thu Nov 3 11:03:52 2011 New Revision: 66671 URL: http://svn.opensuse.org/viewcvs/yast?rev=66671&view=rev Log: add nofail for fstab entries on USB, ISCSI and FCOE disks (bnc#726926) Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/FreeInfo.cc branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes branches/SuSE-Code-11-SP2-Branch/storage/storage/src/modules/FileSystems.ycp Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/FreeInfo.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/FreeInfo.cc?rev=66671&r1=66670&r2=66671&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/FreeInfo.cc (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/FreeInfo.cc Thu Nov 3 11:03:52 2011 @@ -126,7 +126,7 @@ const list<string> dirs = glob(mp + "/*", GLOB_NOSORT | GLOB_ONLYDIR); for (list<string>::const_iterator dir = dirs.begin(); dir != dirs.end(); ++dir) { - if (*dir != "root" && checkDir(*dir)) + if ( !boost::ends_with(*dir,"/root") && checkDir(*dir)) { for (unsigned int i = 0; i < lengthof(files); ++i) { @@ -233,6 +233,28 @@ content_info.homes = numHomes(mp); + if( content_info.homes==0 && !vol.getLabel().empty() ) + { + string lab = boost::to_lower_copy(vol.getLabel()); + y2mil( "label:" << vol.getLabel() << " lab:" << lab ); + if( boost::starts_with( lab, "home" )) + content_info.homes = 1; + } + if( content_info.homes==0 && + (vol.getFs()==EXT2 || vol.getFs()==EXT3 || vol.getFs()==EXT4 )) + { + SystemCmd c( "/sbin/tune2fs -l " + vol.mountDevice() + " | grep '^Last mounted on:'" ); + if( c.retcode()==0 && c.numLines()>0 ) + { + string line = c.getLine(0); + line = line.substr( line.find( ':' )+1 ); + y2mil( "line:" << c.getLine(0) << " lin:" << line ); + line = extractNthWord( 0, line ); + y2mil( "dir:" << line ); + if( line == "/home" ) + content_info.homes = 1; + } + } y2mil("device:" << vol.device() << " " << content_info); return content_info; } Modified: branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes?rev=66671&r1=66670&r2=66671&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes Thu Nov 3 11:03:52 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 2 13:04:19 CET 2011 - fehr@suse.de + +- add nofail for fstab entries on USB, ISCSI and FCOE disks + (bnc#726926) + +------------------------------------------------------------------- Wed Oct 26 13:17:43 CEST 2011 - fehr@suse.de - version 2.17.119 Modified: branches/SuSE-Code-11-SP2-Branch/storage/storage/src/modules/FileSystems.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/storage/src/modules/FileSystems.ycp?rev=66671&r1=66670&r2=66671&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/storage/src/modules/FileSystems.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/storage/src/modules/FileSystems.ycp Thu Nov 3 11:03:52 2011 @@ -1346,7 +1346,7 @@ string dev = part["device"]:""; LibStorage::StorageInterface::getContVolInfo(sint, dev, dp); integer t = LibStorage::ContVolInfo::swig_ctype_get(dp); - if( t == LibStorage::DISK() ) + if( t == LibStorage::DISK() && part["mount"]:""!="/" ) { any infos = LibStorage::DiskInfo::new("LibStorage::DiskInfo"); string disk = LibStorage::ContVolInfo::swig_cdevice_get(dp); @@ -1354,7 +1354,10 @@ integer r = LibStorage::StorageInterface::getDiskInfo(sint, disk, infos); if( r==0 ) { - if(LibStorage::DiskInfo::swig_iscsi_get(infos)) + integer t = LibStorage::DiskInfo::swig_transport_get(infos); + list<integer> hotpl = [ LibStorage::USB(), LibStorage::FCOE(), LibStorage::ISCSI() ]; + y2milestone( "DefaultFstabOptions transport:%1 list:%2", t, hotpl ); + if( contains( hotpl, t )) { if( size(fst_default)>0 ) fst_default = fst_default + ","; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org