#! /bin/sh
#	BSDI $Id: post_install,v 1.2 2000/10/13 16:56:32 polk Exp $

# INSTROOT is normally set by installsw.
if [ "$INSTROOT" = "/" ] ; then
        INSTROOT=
fi

# Link perl into /usr/local/bin if it's not already there.
if [ -d $INSTROOT/usr/local/bin -a ! -e $INSTROOT/usr/local/bin/perl ]; then
	cd $INSTROOT/usr/local/bin && ln -s ../../bin/perl perl
fi

# Link netscape into /usr/local if it's not already there.
if [ -d $INSTROOT/usr/local -a ! -e $INSTROOT/usr/local/netscape ]; then
	cd $INSTROOT/usr/local && ln -s ../share/netscape netscape
fi

# Make sure directories that may have been moved are there...
d=$INSTROOT/usr/X11R6 
if [ ! -d $d ]; then mkdir $d; fi
$INSTROOT/usr/sbin/chown root.wheel $d
chmod 755 $d

d=$INSTROOT/usr/contrib 
if [ ! -d $d ]; then mkdir $d; fi
$INSTROOT/usr/sbin/chown root.wheel $d
chmod 755 $d

d=$INSTROOT/usr/src 
if [ ! -d $d ]; then mkdir $d; fi
$INSTROOT/usr/sbin/chown root.wheel $d
chmod 775 $d

d=$INSTROOT/usr/src/sys
if [ ! -d $d ]; then mkdir $d; fi
$INSTROOT/usr/sbin/chown root.wheel $d
chmod 775 $d

exit 0
