#!/bin/sh

if [ "$1" = "configure" ]; then

	if [ -d /usr/doc -a ! -e /usr/doc/@CNXTTARGET@modem -a -d /usr/share/doc/@CNXTTARGET@modem ]; then
		ln -sf ../share/doc/@CNXTTARGET@linmodem /usr/doc/@CNXTTARGET@linmodem
	fi

	if [ -z "${CNXT_NOAUTOCONFIG}" ]; then
        	@CNXTSBINDIR@/@CNXTTARGET@config ${CNXT_AUTOCONFIGARGS}
        	exit $?
	else
        	echo "To complete the installation and configuration of your modem,"
        	echo "please run \"@CNXTTARGET@config\" (or \"@CNXTSBINDIR@/@CNXTTARGET@config\")"
        	exit 0
	fi
fi

