-Fix problem where copycds would not umount correctly
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1872 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -5,6 +5,7 @@ use xCAT::Table; | ||||
| use Data::Dumper; | ||||
| use Getopt::Long; | ||||
| use File::Basename; | ||||
| use Cwd; | ||||
| Getopt::Long::Configure("bundling"); | ||||
| Getopt::Long::Configure("pass_through"); | ||||
|  | ||||
| @@ -34,6 +35,7 @@ sub process_request { | ||||
|   my $arch = undef; | ||||
|   $identified=0; | ||||
|   $::CDMOUNTPATH="/mnt/xcat"; | ||||
|   my $existdir = getcwd; | ||||
|  | ||||
|   @ARGV = @{$request->{arg}}; | ||||
|   GetOptions( | ||||
| @@ -94,6 +96,8 @@ sub process_request { | ||||
|     $doreq->($newreq,\&take_answer); | ||||
|     $::CDMOUNTPATH=""; | ||||
|  | ||||
|     chdir($existdir); | ||||
|     while (wait() > 0) { yield; } #Make sure all children exit before trying umount | ||||
|     system("umount /mnt/xcat"); | ||||
|     unless ($identified) { | ||||
|        $callback->({error=>["copycds could not identify the ISO supplied, you may wish to try -n <osver>"],errorcode=>[1]}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user