The tree adds the installer, service and test paths admitted by this source commit. Nothing else changes about what may cross. Source-Sha: 3e4a3aa4ce092e9e3f51bc78daf3ddc14d9638f8 Policy-Sha: 3e4a3aa4ce092e9e3f51bc78daf3ddc14d9638f8 Tree-Digest: 89d6fce3828a0e0de0c8eeb41ee6750f4462217e2a04b5190297134d7f4a50c3
14 lines
558 B
Shell
14 lines
558 B
Shell
#!/bin/sh
|
|
# Refuse an implicit takeover of script-installed or operator-owned binaries.
|
|
set -e
|
|
case "$1" in install|upgrade) ;; *) exit 0 ;; esac
|
|
for b in redflag-agent redflag-helper redflag-desktop; do
|
|
path="/usr/local/bin/$b"
|
|
if [ -L "$path" ]; then
|
|
[ "$(readlink "$path")" = "/usr/bin/$b" ] && continue
|
|
elif [ ! -e "$path" ]; then
|
|
continue
|
|
fi
|
|
echo "[ERROR] [deb] [preinst] $path is not this package's runtime link; preserve the existing install and explicitly migrate it before installing redflag" >&2
|
|
exit 1
|
|
done
|