To solve a bug, the primary.xml should be unlinked before we depress primary.xml.gz
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9735 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
0259399ae3
commit
fb7a953719
@ -57,16 +57,16 @@ sub fix_directory {
|
||||
chomp($oldsha);
|
||||
|
||||
#update primary.xml.gz & primary.xml
|
||||
if( -r "$dirlocation/primary.xml")
|
||||
{
|
||||
unlink("$dirlocation/primary.xml");
|
||||
}
|
||||
system("/bin/gunzip $dirlocation/primary.xml.gz");
|
||||
|
||||
$oldopensha=`/usr/bin/sha1sum $dirlocation/primary.xml`;
|
||||
$oldopensha =~ s/\s+.*//;
|
||||
chomp($oldopensha);
|
||||
|
||||
if( -r "$dirlocation/primary.xml")
|
||||
{
|
||||
unlink("$dirlocation/primary.xml");
|
||||
}
|
||||
open($primaryxml,"+<$dirlocation/primary.xml");
|
||||
while (<$primaryxml>) {
|
||||
s!xml:base="media://[^"]*"!!g;
|
||||
|
Loading…
Reference in New Issue
Block a user