From 1ea24371cad4f41a5bd8f2da017c45b19d605cdb Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 1 Oct 2012 19:52:03 +0000 Subject: [PATCH] Stop lazy unmounting when loopback devices are on the line... git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13923 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 00671cc0d..0dcdb67d8 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -4212,7 +4212,7 @@ sub copycd { } if ($::CDMOUNTPATH) { chdir("/"); - system("umount -l $::CDMOUNTPATH"); + system("umount $::CDMOUNTPATH"); } }; my $KID; @@ -4765,11 +4765,12 @@ sub cpNetbootImages { if(system("cp /mnt/xcat/* $destDir/")){ xCAT::SvrUtils::sendmsg([1,"Could not copy netboot contents to $destDir"], $output_handler); - system("umount -l /mnt/xcat"); + chdir("/"); + system("umount /mnt/xcat"); return; } chdir("/tmp"); - system("umount -l /mnt/xcat"); + system("umount /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") {