From f23561573c771a3d3549cced0f1aac58c828fba0 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 1 Oct 2012 19:52:10 +0000 Subject: [PATCH] umount -l when a loop devices is involved may be problematic git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13924 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/copycds.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/copycds.pm b/xCAT-server/lib/xcat/plugins/copycds.pm index 17d9396e0..2cb95f44b 100644 --- a/xCAT-server/lib/xcat/plugins/copycds.pm +++ b/xCAT-server/lib/xcat/plugins/copycds.pm @@ -101,7 +101,8 @@ sub process_request { if (system("mount $mntopts '$file' /mnt/xcat")) { eval { $callback->({error=>"copycds was unable to mount $file to /mnt/xcat.",errorcode=>[1]}) }; - system("umount -l /mnt/xcat"); + chdir("/"); + system("umount /mnt/xcat"); return; } eval { @@ -146,7 +147,8 @@ sub process_request { chdir($existdir); while (wait() > 0) { yield(); } #Make sure all children exit before trying umount }; - system("umount -l /mnt/xcat"); + chdir("/"); + system("umount /mnt/xcat"); unless ($identified) { $callback->({error=>["copycds could not identify the ISO supplied, you may wish to try -n "],errorcode=>[1]}); }