#!/sbin/sh
#

PATH=$SW_PATH:/sbin:/usr/bin:/usr/ccs/sbin
export PATH

# is it already there?

if ! grep -q /opt/ndmpcopy/bin /etc/PATH
then exit
fi

echo "remove /opt/ndmpcopy/bin from the /etc/PATH file and"
echo "remove /opt/ndmpcopy/man from the /etc/MANPATH file..."

cat /etc/PATH | sed -e 's|:/opt/ndmpcopy/bin||' > /etc/PATH.new
cat /etc/MANPATH | sed -e 's|:/opt/ndmpcopy/man||' > /etc/MANPATH.new

if [ -f /etc/PATH.new ]
then
	mv /etc/PATH.new /etc/PATH
fi

if [ -f /etc/MANPATH.new ]
then
	mv /etc/MANPATH.new /etc/MANPATH
fi
