File: libc.postrm

package info (click to toggle)
glibc 2.19-16
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 203,652 kB
  • sloc: ansic: 969,800; asm: 241,205; sh: 10,063; makefile: 8,471; cpp: 3,595; perl: 2,077; pascal: 1,839; awk: 1,704; yacc: 317; sed: 73
file content (57 lines) | stat: -rw-r--r-- 1,945 bytes parent folder | download | duplicates (14)
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
#! /bin/sh
set -e

if [ "$1" = remove ]; then
    if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
	if [ -x /usr/lib/pt_chown ]; then
	    suidunregister -s LIBC /usr/lib/pt_chown
	elif [ -x /usr/libexec/pt_chown ]; then
	    suidunregister -s LIBC /usr/libexec/pt_chown
	fi
    fi
    # When both the multiarch and the corresponding biarch packages are
    # installed, removing the multiarch package will remove the dynamic
    # linker. Recreate it in the postinst.
    ARCH=${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)}
    case "${ARCH}" in
        kfreebsd-i386 | s390 | powerpc)
            target="/lib32/ld.so.1"
            ;;
        i386 | sparc)
            target="/lib32/ld-linux.so.2"
            ;;
        *)
            target="$(dpkg-query -L LIBC-${ARCH} 2>/dev/null | grep -E '/lib.*/ld-[0-9.]+\.so$' || true)"
            ;;
    esac
    if [ -f "$target" ] && ! [ -f RTLD_SO ] ; then
        ln -sf ${target#$(dirname RTLD_SO)/} RTLD_SO
    fi
fi

if [ "$1" = deconfigure ]; then
    :; # blah, do something useful with ldso
fi

#if [ "$1" = purge ]; then
#    update-rc.d mountkernfs remove > /dev/null
#fi

# We now use the multiarch triplet instead of the GNU triplet for the ld.so
# configuration file, in order to keep a stable path. Remove the old file.
case ${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} in
    hurd-i386)
        dpkg-maintscript-helper rm_conffile /etc/ld.so.conf.d/i486-gnu.conf 2.19-11~ libc0.3:hurd-i386 -- "$@"
        dpkg-maintscript-helper rm_conffile /etc/ld.so.conf.d/i486-gnu-gnu.conf 2.19-11~ libc0.3:hurd-i386 -- "$@"
        ;;
    i386)
        dpkg-maintscript-helper rm_conffile /etc/ld.so.conf.d/i486-linux-gnu.conf 2.19-4~ libc6:i386 -- "$@"
        ;;
    kfreebsd-i386)
        dpkg-maintscript-helper rm_conffile /etc/ld.so.conf.d/i486-kfreebsd-gnu.conf 2.19-11~ libc0.1:kfreebsd-i386 -- "$@"
        ;;
esac

#DEBHELPER#

exit 0