-Have copycds umount on interrupt, SF bug 1962643
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1409 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8a51df6b90
commit
59ab923725
@ -771,6 +771,9 @@ sub copycd
|
||||
my $reaped = 0;
|
||||
$SIG{INT} = $SIG{TERM} = sub {
|
||||
if ($cpiopid) { kill 2, $cpiopid; exit 0; }
|
||||
if ($::CDMOUNTPATH) {
|
||||
system("umount $::CDMOUNTPATH");
|
||||
}
|
||||
};
|
||||
my $KID;
|
||||
chdir $path;
|
||||
|
@ -32,6 +32,7 @@ sub process_request {
|
||||
my $distname = undef;
|
||||
my $arch = undef;
|
||||
$identified=0;
|
||||
$::CDMOUNTPATH="/mnt/xcat";
|
||||
|
||||
@ARGV = @{$request->{arg}};
|
||||
GetOptions(
|
||||
@ -69,6 +70,7 @@ sub process_request {
|
||||
push @{$newreq->{arg}},("-a",$arch);
|
||||
}
|
||||
$doreq->($newreq,\&take_answer);
|
||||
$::CDMOUNTPATH="";
|
||||
|
||||
system("umount /mnt/xcat");
|
||||
unless ($identified) {
|
||||
|
@ -412,7 +412,11 @@ sub copycd
|
||||
mkpath("$installroot/$distname/$arch/$discnumber");
|
||||
umask $omask;
|
||||
my $rc;
|
||||
$SIG{INT} = $SIG{TERM} = sub { if ($cpiopid) { kill 2, $cpiopid; exit 0; } };
|
||||
$SIG{INT} = $SIG{TERM} = sub { if ($cpiopid) { kill 2, $cpiopid; exit 0; }
|
||||
if ($::CDMOUNTPATH) {
|
||||
system("umount $::CDMOUNTPATH");
|
||||
}
|
||||
};
|
||||
my $kid;
|
||||
chdir $path;
|
||||
my $child = open($kid,"|-");
|
||||
|
Loading…
Reference in New Issue
Block a user