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
This commit is contained in:
cjhardee 2012-08-05 05:03:28 +00:00
parent d489e54953
commit 1acdee07e7
2 changed files with 4 additions and 4 deletions

View File

@ -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 <osver>"],errorcode=>[1]});
}

View File

@ -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") {