From 1acdee07e73f7cc8884269888c66ccdd5c088d24 Mon Sep 17 00:00:00 2001 From: cjhardee Date: Sun, 5 Aug 2012 05:03:28 +0000 Subject: [PATCH] Made the unmounting lazy so it worked when in use git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13425 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/copycds.pm | 2 +- xCAT-server/lib/xcat/plugins/esx.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/copycds.pm b/xCAT-server/lib/xcat/plugins/copycds.pm index 5beabb975..b1de9e830 100644 --- a/xCAT-server/lib/xcat/plugins/copycds.pm +++ b/xCAT-server/lib/xcat/plugins/copycds.pm @@ -140,7 +140,7 @@ sub process_request { chdir($existdir); while (wait() > 0) { yield(); } #Make sure all children exit before trying umount - system("umount /mnt/xcat"); + system("umount -l /mnt/xcat"); unless ($identified) { $callback->({error=>["copycds could not identify the ISO supplied, you may wish to try -n "],errorcode=>[1]}); } diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index cad5f76c7..2c7180705 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -4210,7 +4210,7 @@ sub copycd { } if ($::CDMOUNTPATH) { chdir("/"); - system("umount $::CDMOUNTPATH"); + system("umount -l $::CDMOUNTPATH"); } }; my $KID; @@ -4763,11 +4763,11 @@ sub cpNetbootImages { if(system("cp /mnt/xcat/* $destDir/")){ xCAT::SvrUtils::sendmsg([1,"Could not copy netboot contents to $destDir"], $output_handler); - system("umount /mnt/xcat"); + system("umount -l /mnt/xcat"); return; } chdir("/tmp"); - system("umount /mnt/xcat"); + system("umount -l /mnt/xcat"); print "tempDir: $tmpDir\n"; system("rm -rf $tmpDir"); } elsif (-r "$srcDir/cim.vgz" and -r "$srcDir/vmkernel.gz" and -r "$srcDir/vmkboot.gz" and -r "$srcDir/sys.vgz") {