#!/bin/sh

set -e

case "$1" in
	configure)
		if ! dpkg-statoverride --list /usr/bin/nwrite >/dev/null
		then
			dpkg-statoverride --update --add root tty 2755 /usr/bin/nwrite
		fi
		;;

	abort-upgrade|abort-remove|abort-deconfigure)

		;;

	*)
		echo "postinst called with unknown argument \`$1'" >&2
		exit 1
		;;
esac

# Remove /usr/bin/write alternative, from old versions.
update-alternatives --remove write /usr/bin/nwrite

#DEBHELPER#

exit 0
