fix for bug 2790535, does not create symbolic links under directory /tftpboot

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2009-05-13 09:03:23 +00:00
parent d133bc2afb
commit 6b6c6f3b2c

View File

@ -151,7 +151,8 @@ sub setstate {
}
}
}
my $hassymlink = eval { symlink("",""); 1 };
# Do not use symbolic link, p5 does not support symbolic link in /tftpboot
# my $hassymlink = eval { symlink("",""); 1 };
foreach $ip (keys %ipaddrs) {
my @ipa=split(/\./,$ip);
my $pname = sprintf("%02x%02x%02x%02x",@ipa);
@ -163,19 +164,19 @@ sub setstate {
{
unlink($tftpdir . "/" . $sles11_special_link);
}
if ($hassymlink) {
symlink($node,$tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
{
symlink($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
}
} else {
#if ($hassymlink) {
# symlink($node,$tftpdir."/etc/".$pname);
# if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
# {
# symlink($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
# }
#} else {
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
{
link($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
}
}
#}
}
}