#!/bin/sh
set -e

# If upgrading from < 1.5-10 copy existing configfile from /etc to /etc/timeoutd
if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "1.5-10"; then
    if [ -e /etc/timeouts -a ! -e /etc/timeoutd/timeouts ]; then
	mkdir -p /etc/timeoutd/timeouts
	cp /etc/timeouts /etc/timeoutd
echo "$THIS_PACKAGE $THIS_SCRIPT: Copying existing configfile /etc/timeouts to /etc/timeoutd/timeouts"
    fi
fi
