Register shared Linux CLI links with deb lifecycle management for 0.2.4
This commit is contained in:
1 parent
dc8edf0df6
commit
3c6c4a0e90
11 files changed
+242
-19
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# Template expanded into Debian maintainer scripts by build-linux-packages.sh.
|
||||
set -eu
|
||||
package='@PACKAGE@'
|
||||
priority='@PRIORITY@'
|
||||
hook='@HOOK@'
|
||||
prefix="/opt/ttstd/$package"
|
||||
# DPKG_ROOT also permits real dpkg lifecycle tests without touching host links.
|
||||
root=${DPKG_ROOT:-}
|
||||
alternatives() {
|
||||
if [ -n "$root" ]; then
|
||||
update-alternatives --root "$root" "$@"
|
||||
else
|
||||
update-alternatives "$@"
|
||||
fi
|
||||
}
|
||||
case "$hook:${1:-}" in
|
||||
postinst:configure|postinst:triggered|postinst:abort-upgrade|postinst:abort-remove|postinst:abort-deconfigure)
|
||||
for tool in adsctl ads-agent ads-client ads-usb; do
|
||||
if [ -x "$root$prefix/$tool" ]; then
|
||||
alternatives --install "/usr/bin/$tool" "$tool" "$prefix/$tool" "$priority"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
prerm:remove|prerm:deconfigure|postrm:remove|postrm:purge|postrm:disappear)
|
||||
for tool in adsctl ads-agent ads-client ads-usb; do
|
||||
alternatives --remove "$tool" "$prefix/$tool"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
Reference in new issue
Block a user