Author: ug Date: Tue Apr 26 10:16:06 2011 New Revision: 63855 URL: http://svn.opensuse.org/viewcvs/yast?rev=63855&view=rev Log: try to mount DVD/CD again if first try fails bnc#684974 Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes?rev=63855&r1=63854&r2=63855&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes Tue Apr 26 10:16:06 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Apr 26 10:14:58 CEST 2011 - ug@suse.de + +- try to mount DVD/CD again if first mount fails + (bnc#684974) + +------------------------------------------------------------------- Wed Feb 23 08:20:27 CET 2011 - jsrain@suse.cz - do not reread target map if target system is already mounted Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp?rev=63855&r1=63854&r2=63855&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp Tue Apr 26 10:16:06 2011 @@ -132,19 +132,25 @@ if (Installation::boot () == "cd") { string cdrom = (string)SCR::Read (.etc.install_inf.Cdrom); - if (!(boolean)WFM::Execute(.local.mount, ["/dev/" + cdrom, - mount_point, Installation::mountlog] )) - { - // autoyast tried to mount the CD but had no success. - GET_error = GET_error + sformat(_("Mounting %1 failed."), cdrom ); - y2warning("Mount failed"); - } - else - { - string cpcmd = sformat("cp " + mount_point + "/%1 %2", Path , Localfile); - y2milestone("Copy profile: %1", cpcmd); - SCR::Execute(.target.bash, cpcmd); - } + integer try_again = 10; + while( try_again > 0 ) { + if (!(boolean)WFM::Execute(.local.mount, ["/dev/" + cdrom, + mount_point, Installation::mountlog] )) + { + // autoyast tried to mount the CD but had no success. + GET_error = GET_error + sformat(_("Mounting %1 failed."), cdrom ); + y2warning("Mount failed"); + try_again = try_again - 1; + sleep(3000); + } + else + { + string cpcmd = sformat("cp " + mount_point + "/%1 %2", Path , Localfile); + y2milestone("Copy profile: %1", cpcmd); + SCR::Execute(.target.bash, cpcmd); + try_again = 0; + } + } WFM::Execute(.local.umount, mount_point); if (SCR::Read(.target.size, Localfile) > 0 ) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org