Make extra effort to assure /mnt/xcat is not held in event of catastrophe
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13746 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
45edd600c4
commit
93f5b9f6cb
@ -100,9 +100,11 @@ sub process_request {
|
||||
mkdir "/mnt/xcat";
|
||||
|
||||
if (system("mount $mntopts '$file' /mnt/xcat")) {
|
||||
$callback->({error=>"copycds was unable to mount $file to /mnt/xcat.",errorcode=>[1]});
|
||||
eval { $callback->({error=>"copycds was unable to mount $file to /mnt/xcat.",errorcode=>[1]}) };
|
||||
system("umount -l /mnt/xcat")) {
|
||||
return;
|
||||
}
|
||||
eval {
|
||||
my $newreq = dclone($request);
|
||||
$newreq->{command}= [ 'copycd' ]; #Note the singular, it's different
|
||||
$newreq->{arg} = ["-m","/mnt/xcat"];
|
||||
@ -143,6 +145,7 @@ sub process_request {
|
||||
|
||||
chdir($existdir);
|
||||
while (wait() > 0) { yield(); } #Make sure all children exit before trying umount
|
||||
};
|
||||
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]});
|
||||
|
Loading…
x
Reference in New Issue
Block a user