From c85d0aab95b634a0b088a412eb0aaa42af09dcf5 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 14 Nov 2012 03:40:31 +0000 Subject: [PATCH] lazy umount of loop device is problematic,the loop device will not released git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14319 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/copycds.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/copycds.pm b/xCAT-server/lib/xcat/plugins/copycds.pm index 25e691987..5f7d85f6b 100644 --- a/xCAT-server/lib/xcat/plugins/copycds.pm +++ b/xCAT-server/lib/xcat/plugins/copycds.pm @@ -113,7 +113,7 @@ sub process_request { if (system("mount $mntopts '$file' $mntpath")) { eval { $callback->({error=>"copycds was unable to mount $file to $mntpath.",errorcode=>[1]}) }; chdir("/"); - system("umount -l $mntpath"); + system("umount $mntpath"); return; } eval { @@ -165,7 +165,7 @@ sub process_request { while (wait() > 0) { yield(); } #Make sure all children exit before trying umount }; chdir("/");; - system("umount -l $mntpath"); + system("umount $mntpath"); system("rm -rf $mntpath"); unless ($identified) { $callback->({error=>["copycds could not identify the ISO supplied, you may wish to try -n "],errorcode=>[1]});