fixed SF bug #3392 rmimage removes tftpboot kernel file that may be used by other images
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15349 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ba6778494f
commit
8db73414b3
@ -156,8 +156,8 @@ sub process_request {
|
||||
return;
|
||||
}
|
||||
|
||||
my $tftpdir = "$tftproot/xcat/netboot/$osver/$arch/$profile";
|
||||
my @filestoremove = ("$imagedir/rootimg.gz", "$imagedir/kernel", "$imagedir/initrd.gz", "$tftpdir/initrd.gz", "$tftpdir/kernel");
|
||||
|
||||
my @filestoremove = ("$imagedir/rootimg.gz", "$imagedir/kernel", "$imagedir/initrd-stateless.gz", "$imagedir/initrd-statelite.gz");
|
||||
|
||||
#some rpms like atftp mount the rootimg/proc to /proc, we need to make sure rootimg/proc is free of junk
|
||||
`umount -l $imagedir/rootimg/proc 2>&1 1>/dev/null`;
|
||||
@ -177,6 +177,16 @@ sub process_request {
|
||||
}
|
||||
}
|
||||
|
||||
#remove image files under tftpdir
|
||||
my $tftpdir = "$tftproot/xcat/netboot/$osver/$arch/$profile";
|
||||
if ($imagename) {
|
||||
$tftpdir = "$tftproot/xcat/osimage/$imagename";
|
||||
}
|
||||
if (-d "$tftpdir") {
|
||||
$callback->({info=>["Removing directory $tftpdir"]});
|
||||
rmtree "$tftpdir";
|
||||
}
|
||||
|
||||
$callback->({info=>["Image files have been removed successfully from this management node."]});
|
||||
|
||||
if (!$imagename || ($method eq "statelite")) {
|
||||
|
Loading…
Reference in New Issue
Block a user