summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-05-23 00:35:38 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-05-23 00:39:53 +0200
commit818712f99f165011aaaad5fd82c40304004ace23 (patch)
treeeda349ab973a7b7f47961965ee5440ca5d506941
parent05b9805bf98ddfc6a0ecf72b778182eb7af169e2 (diff)
downloadpleroma-818712f99f165011aaaad5fd82c40304004ace23.tar.gz
pleroma-818712f99f165011aaaad5fd82c40304004ace23.zip
pleroma_ctl: Use realpath(1) instead of readlink(1)
From realpath(1) in POSIX 202x Draft 4.1: > If file does not name a symbolic link, readlink shall write a diagnostic > message to standard error and exit with non-zero status. Which also doesn't includes `-f`, in preference of `realpath`.
-rw-r--r--changelog.d/realpath-over-readlink.fix1
-rwxr-xr-xrel/files/bin/pleroma_ctl2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/realpath-over-readlink.fix b/changelog.d/realpath-over-readlink.fix
new file mode 100644
index 000000000..479561b95
--- /dev/null
+++ b/changelog.d/realpath-over-readlink.fix
@@ -0,0 +1 @@
+pleroma_ctl: Use realpath(1) instead of readlink(1)
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl
index 87c486514..6f0dba3a8 100755
--- a/rel/files/bin/pleroma_ctl
+++ b/rel/files/bin/pleroma_ctl
@@ -134,7 +134,7 @@ if [ -z "$1" ] || [ "$1" = "help" ]; then
"
else
- SCRIPT=$(readlink -f "$0")
+ SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
FULL_ARGS="$*"