postinst is in lsb-core 4.0-0ubuntu20.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | #!/bin/sh -e
setup_ldso_symlink () {
ARCH=$DPKG_MAINTSCRIPT_ARCH
if [ -z "$ARCH" ]; then
ARCH=$(dpkg --print-architecture)
fi
case "$ARCH" in
s390|ppc64|sparc|sparc64|alpha|hppa|m68k|mipsel)
ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.1
ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.2
ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.3
;;
powerpc)
ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.1
ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.2
ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.3
;;
i386)
ln -sf ld-linux.so.2 /lib/ld-lsb.so.1
ln -sf ld-linux.so.2 /lib/ld-lsb.so.2
ln -sf ld-linux.so.2 /lib/ld-lsb.so.3
;;
amd64)
ln -sf ld-linux.so.2 /lib/ld-lsb.so.1
ln -sf ld-linux.so.2 /lib/ld-lsb.so.2
ln -sf ld-linux.so.2 /lib/ld-lsb.so.3
ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.2
ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
[ -L /lib/ld-lsb-x86-64.so.2 ] && rm /lib/ld-lsb-x86-64.so.2 || true
[ -L /lib/ld-lsb-x86-64.so.3 ] && rm /lib/ld-lsb-x86-64.so.3 || true
;;
ia64)
ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.1
ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.2
ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.3
;;
*)
echo "ld-lsb-*.so.1 symlink for $ARCH is unknown!"
;;
esac
}
PATH=/sbin:/usr/sbin:$PATH
export PATH
. /usr/share/debconf/confmodule
case "$1" in
configure)
if [ ! -e /etc/shadow ]; then
db_get lsb/shadowconfig
if [ "$RET" = "true" ]; then
shadowconfig on >&2 || true
fi
fi
setup_ldso_symlink
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
|