File: postinst

package info (click to toggle)
fdutils 5.4-20040228-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,024 kB
  • ctags: 674
  • sloc: ansic: 6,246; sh: 3,080; makefile: 296; sed: 4
file content (47 lines) | stat: -rw-r--r-- 1,448 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
set -e

#DEBHELPER#

case "$1" in
    configure)
	install-info --description='Linux floppy utilities' \
	    --section "Disk Management" "Disk Management" \
	    --quiet /usr/share/info/fdutils.info.gz

	if [ "$DEBIAN_FRONTEND" ]; then
	    DEBIAN_FRONTEND=`echo "$DEBIAN_FRONTEND" | tr A-Z a-z`
	fi
	
	if [ "$DEBIAN_FRONTEND" != "noninteractive" ] \
	    && dpkg --compare-versions "$2" lt "5.2.0.1998-07-01-3"; then
	    /usr/sbin/fdutilsconfig
	    echo
	    echo "Please note that you can run '/usr/sbin/fdutilsconfig' to change"
	    echo "fdmount setuid root settings."
	elif [ -e /etc/fdmount.conf ] \
	    && dpkg --compare-versions "$2" lt "5.3-4"; then
	    if grep -q "is_suid=yes" /etc/fdmount.conf \
		&& ! dpkg-statoverride --list /usr/bin/fdmount >/dev/null; then
		dpkg-statoverride --update --add root floppy 4750 /usr/bin/fdmount
	    fi
	    echo "Keeping old fdmount setuid root settings."
	    echo "Please note that you can run"
	    echo "'/usr/sbin/fdutilsconfig' to change them."
	fi

	if [ -e "/etc/fdprm" ]; then
	    echo "Fdutils-5.0 introduced two new configuration files: /etc/mediaprm and"
	    echo "/etc/driveprm.  They replace the old /etc/fdprm."
	    echo "Renaming old file /etc/fdprm to /etc/fdprm.obsolete ..."
	    mv -f /etc/fdprm /etc/fdprm.obsolete
	    echo
	fi
	;;

    abort-upgrade|abort-remove|abort-deconfigure)
	;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
	;;
esac