From a7e7deaf99f9284741bc3f0bece4499615643dbb Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 31 Dec 2020 01:09:51 +1300 Subject: [PATCH] Deb: add as vncserver, etc alternative --- debian/postinst | 11 +++++++++++ debian/prerm | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/debian/postinst b/debian/postinst index 6e80819..258c216 100644 --- a/debian/postinst +++ b/debian/postinst @@ -20,6 +20,17 @@ set -e case "$1" in configure) + bindir=/usr/bin + mandir=/usr/share/man + commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc" + + for kasm_command in $commands; do + generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`; + update-alternatives --install "$bindir/$generic_command" \ + "$generic_command" "$bindir/$kasm_command" 90 \ + --slave "$mandir/man1/$generic_command.1.gz" "$generic_command.1.gz" \ + "$mandir/man1/$kasm_command.1.gz" + done ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/prerm b/debian/prerm index ebde234..8c0802f 100644 --- a/debian/prerm +++ b/debian/prerm @@ -18,6 +18,17 @@ set -e case "$1" in + remove) + bindir=/usr/bin + mandir=/usr/share/man + commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc" + + for kasm_command in $commands; do + generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`; + update-alternatives --remove "$generic_command" "$bindir/$kasm_command" + done + ;; + remove|upgrade|deconfigure) ;;