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
|
#!/bin/sh
set -e
case "$1" in
configure)
install-info --description='Linux floppy utilities' \
--section "Disk Management" "Disk Management" \
--quiet /usr/info/fdutils.info.gz
if command -v install-docs >/dev/null 2>&1; then
install-docs -i /usr/share/doc-base/fdutils
install-docs -i /usr/share/doc-base/fdutils-faq
fi
#DEBHELPER#
if 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."
else
if grep -q "is_suid=yes" /etc/fdmount.conf; then
if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
suidregister -s fdutils /usr/bin/fdmount root root 4755
else
chown root.root /usr/bin/fdmount
chmod 4755 /usr/bin/fdmount
fi
fi
echo "Keeping old fdmount setuid root settings. Please note that"
echo "you can run '/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
# echo ' Running "/dev/MAKEDEV floppy-all" ...'
# cd /dev && ./MAKEDEV floppy-all
echo ' Running "/usr/sbin/MAKEFLOPPIES -g" ...'
/usr/sbin/MAKEFLOPPIES -g
cat <<END
If you prefer, you might like to run "/usr/sbin/MAKEFLOPPIES -g" or
"/dev/MAKEDEV floppy-all" to (re-)create /dev/fd* floppy device files.
Note: /usr/bin/fdformat is obsolete and is no longer available.
Please use /usr/bin/superformat instead. Also, there had been some
major changes from version 4.x. Please refer to the documentation.
END
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
;;
esac
|