File: mt-st.postinst

package info (click to toggle)
mt-st 1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 276 kB
  • sloc: ansic: 1,612; makefile: 96; sh: 18; lisp: 2
file content (23 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -eu

#DEBHELPER#

if [ "$1" = configure ]; then
  update-alternatives \
    --install /bin/mt mt /bin/mt-st 20 \
    --slave \
    /usr/share/man/man1/mt.1.gz mt.1.gz /usr/share/man/man1/mt-st.1.gz

  # Potentially upgrading from an older version. Check to see if we
  # need to remove the (now obsolete) init script rc?.d symlinks, and
  # potentially parent directory of the other obsolete conffile
  # (needed due to bug in interaction between dpkg and
  # dpkg-maintscript-helper, see #815969).
  if  dpkg --compare-versions "$2" lt-nl "1.3-1"; then
    update-rc.d mt-st remove
    rmdir --ignore-fail-on-non-empty /etc/modprobe.d/
  fi

fi