-Switch to using symbolic rather than hard links as possible
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
2f4f7acab5
commit
66bddcad5d
@ -126,11 +126,16 @@ sub setstate {
|
||||
}
|
||||
}
|
||||
}
|
||||
my $hassymlink = eval { symlink("",""); 1 };
|
||||
foreach $ip (keys %ipaddrs) {
|
||||
my @ipa=split(/\./,$ip);
|
||||
my $pname = sprintf("%02X%02X%02X%02X",@ipa);
|
||||
unlink($tftpdir."/pxelinux.cfg/".$pname);
|
||||
link($tftpdir."/pxelinux.cfg/".$node,$tftpdir."/pxelinux.cfg/".$pname);
|
||||
if ($hassymlink) {
|
||||
symlink($node,$tftpdir."/pxelinux.cfg/".$pname);
|
||||
} else {
|
||||
link($tftpdir."/pxelinux.cfg/".$node,$tftpdir."/pxelinux.cfg/".$pname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,11 +135,16 @@ sub setstate {
|
||||
}
|
||||
}
|
||||
}
|
||||
my $hassymlink = eval { symlink("",""); 1 };
|
||||
foreach $ip (keys %ipaddrs) {
|
||||
my @ipa=split(/\./,$ip);
|
||||
my $pname = sprintf("%02x%02x%02x%02x",@ipa);
|
||||
unlink($tftpdir."/etc/".$pname);
|
||||
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
|
||||
if ($hassymlink) {
|
||||
symlink($node,$tftpdir."/etc/".$pname);
|
||||
} else {
|
||||
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user