Skip to content

Commit d943602

Browse files
committed
TUN-9919: Make RPM postinstall scriplet idempotent
* TUN-9919: Make RPM postinstall scriplet idempotent Before this commit the postinstall scriptlet isn't idempotent, meaning the users see this error in their upgrade logs: `ln: failed to create symbolic link '/usr/local/bin/cloudflared': File exists warning: %post(cloudflared-2025.10.0-1.x86_64) scriptlet failed, exit status 1` This doesn't break the upgrade (which is why we haven't touched this in 5 years), but adding the -f (force) flag to the symlink command prevents this issue from happening Closes TUN-9919
1 parent e10e072 commit d943602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postinst.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
set -eu
3-
ln -s /usr/bin/cloudflared /usr/local/bin/cloudflared
3+
ln -sf /usr/bin/cloudflared /usr/local/bin/cloudflared
44
mkdir -p /usr/local/etc/cloudflared/
55
touch /usr/local/etc/cloudflared/.installedFromPackageManager || true

0 commit comments

Comments
 (0)