[yast-commit] r60191 - in /branches/SuSE-Code-11-SP1-Branch/autoinstallation: package/autoyast2.changes src/include/io.ycp
![](https://seccdn.libravatar.org/avatar/2f8a5b55b74eb727b5ee47fed82a1454.jpg?s=120&d=mm&r=g)
Author: ug Date: Wed Dec 23 14:15:16 2009 New Revision: 60191 URL: http://svn.opensuse.org/viewcvs/yast?rev=60191&view=rev Log: fix for already mounted USB devices (bnc#565558) Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/io.ycp Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes?rev=60191&r1=60190&r2=60191&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes Wed Dec 23 14:15:16 2009 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Dec 23 14:14:11 CET 2009 - ug@suse.de + +- fix for already mounted USB devices (bnc#565558) + +------------------------------------------------------------------- Wed Nov 25 15:57:35 CET 2009 - ug@suse.de - mountby was not cloned correctly (bnc#557759) Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/io.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/io.ycp?rev=60191&r1=60190&r2=60191&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/io.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/io.ycp Wed Dec 23 14:15:16 2009 @@ -217,7 +217,20 @@ integer i = 0; string dev = d["dev_name"]:""; while( SCR::Read(.target.lstat, dev) != $[] || i < 5 ) { - if( !(boolean)WFM::Execute(.local.mount, [ dev, mount_point ]) ) { + string mounts = (string)(SCR::Read (.target.string, "/proc/mounts")); + list<string> mount_list = splitstring( mounts, "\n" ); + boolean already_mounted = false; + foreach( string m, mount_list, ``{ + list<string> entries = splitstring( m, " " ); + // FIXME: check for bind-mounted + if( entries[0]:"" == dev ) { + already_mounted = true; + mount_point = entries[1]:""; + break; + } + }); + y2milestone("already mounted=%1 mountpoint=%2",already_mounted,mount_point); + if( ! already_mounted && !(boolean)WFM::Execute(.local.mount, [ dev, mount_point ]) ) { y2milestone("mount failed for %1", dev); i = i + 1; dev = d["dev_name"]:"" + sformat("%1",i); @@ -230,7 +243,8 @@ GET_error = ""; ok = true; } - SCR::Execute(.target.umount, mount_point); + if( !already_mounted ) + SCR::Execute(.target.umount, mount_point); if( ok == true ) break; i = i + 1; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ug@svn.opensuse.org