[yast-commit] r40611 - in /trunk/storage: libstorage/src/Volume.cc package/yast2-storage.changes
Author: fehr Date: Thu Aug 30 12:30:52 2007 New Revision: 40611 URL: http://svn.opensuse.org/viewcvs/yast?rev=40611&view=rev Log: restart boot.quota if quota options have changed (#304841) Modified: trunk/storage/libstorage/src/Volume.cc trunk/storage/package/yast2-storage.changes Modified: trunk/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=40611&r1=40610&r2=40611&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Thu Aug 30 12:30:52 2007 @@ -2323,6 +2323,21 @@ return( l!=NULL ); } +static bool haveQuota( const string& fstopt ) + { + bool ret = false; + list<string> opt = splitString( fstopt, "," ); + list<string>::const_iterator i = opt.begin(); + while( !ret && i!=opt.end() ) + { + ret = (*i=="usrquota") || (*i=="usrquota") || + i->find("usrjquota=")==0 || i->find("grpjquota=")==0; + ++i; + } + y2mil( "fstopt:" << fstopt << " ret:" << ret ); + return( ret ); + } + int Volume::doFstabUpdate() { int ret = 0; @@ -2449,6 +2464,7 @@ fstab_opt!=orig_fstab_opt && !orig_fstab_opt.empty() && mp==orig_mp && mp!="swap" ) { + SystemCmd c; y2mil( "fstab_opt:" << fstab_opt << " fstab_opt_orig:" << orig_fstab_opt ); y2mil( "remount:" << *this ); int r = umount( mp ); @@ -2460,11 +2476,15 @@ } else { - SystemCmd c( (string)"mount -oremount " + mp ); + c.execute( (string)"mount -oremount " + mp ); y2mil( "remount remount:" << c.retcode() ); if( c.retcode()!=0 ) ret = VOLUME_REMOUNT_FAILED; } + if( haveQuota(fstab_opt)!=haveQuota(orig_fstab_opt) ) + { + c.execute( "/etc/init.d/boot.quota restart" ); + } } y2milestone( "changed:%d ret:%d", changed, ret ); return( ret ); Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=40611&r1=40610&r2=40611&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Thu Aug 30 12:30:52 2007 @@ -2,6 +2,7 @@ Thu Aug 30 11:37:39 CEST 2007 - fehr@suse.de - call insserv for boot.crypto during update from <=10.2 (#305105) +- restart boot.quota if quota options have changed (#304841) ------------------------------------------------------------------- Tue Aug 28 17:28:32 CEST 2007 - fehr@suse.de -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn.opensuse.org