summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/c_rehash.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index baec7c14ff..26db8999d8 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -117,7 +117,12 @@ sub link_hash_cert {
}
$hash .= ".$suffix";
print "$fname => $hash\n";
- symlink $fname, $hash;
+ $symlink_exists=eval {symlink("",""); 1};
+ if ($symlink_exists) {
+ symlink $fname, $hash;
+ } else {
+ system ("cp", $fname, $hash);
+ }
$hashlist{$hash} = $fprint;
}
@@ -142,7 +147,12 @@ sub link_hash_crl {
}
$hash .= ".r$suffix";
print "$fname => $hash\n";
- symlink $fname, $hash;
+ $symlink_exists=eval {symlink("",""); 1};
+ if ($symlink_exists) {
+ symlink $fname, $hash;
+ } else {
+ system ("cp", $fname, $hash);
+ }
$hashlist{$hash} = $fprint;
}