about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch')
-rw-r--r--nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch b/nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch
new file mode 100644
index 000000000000..f7a2078c0343
--- /dev/null
+++ b/nixpkgs/pkgs/servers/mail/postfix/relative-symlinks.patch
@@ -0,0 +1,13 @@
+diff --git a/postfix-install b/postfix/postfix-install
+index 1662c3d..0f20ec0 100644
+--- a/postfix-install
++++ b/postfix-install
+@@ -336,7 +336,7 @@ compare_or_symlink() {
+ 	# 2) we cannot use mv to replace a symlink-to-directory;
+ 	# 3) "ln -n" is not in POSIX, therefore it's not portable.
+ 	# rm+ln is less atomic but this affects compatibility symlinks only.
+-	rm -f $2 && ln -sf $link $2 || exit 1
++	rm -f $2 && ln -rsf $link $2 || exit 1
+     }
+ }
+