#!/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 "add /opt/ndmpcopy/bin to the /etc/PATH file and"
echo "add /opt/ndmpcopy/man to the /etc/MANPATH file..."

mv /etc/PATH /etc/PATH.old
mv /etc/MANPATH /etc/MANPATH.old

awk '{print "/opt/ndmpcopy/bin:" $1 }' < /etc/PATH.old    >/etc/PATH
awk '{print "/opt/ndmpcopy/man:" $1 }' < /etc/MANPATH.old >/etc/MANPATH

if [ -f /etc/PATH ]
then rm -f /etc/PATH.old
fi

if [ -f /etc/MANPATH ]
then rm -f /etc/MANPATH.old
fi
