#! /bin/sh

esc=`echo -en "\033"`
red="${esc}[1;31m"
norm=`echo -en "${esc}[m\017"`

echo -e "\n\a${red}NOTE:${norm} The format of the pppd peer scripts has been changed!"

if which perl > /dev/null; then
	find /etc/ppp/peers -type f | while read file ; do
		if fgrep /etc/ppp/plugins $file >/dev/null; then
			perl editpeer $file
		fi
	done
	echo -e "      The peer scripts have been checked/updated.\n"
else
	echo "      Please update your peer scripts according to the installed examples."
	echo -e "      (See: /etc/ppp/peers/isdn/*)\n"
fi

