#!/bin/sh

# exit if basedir is null or /
if [ $BASEDIR = "" ];then
	exit 1
fi
if [ $BASEDIR = "/" ];then
	exit 1
fi
#create the link
if [ -f $BASEDIR/etc/shadow ];then
	mv $BASEDIR/etc/shadow $BASEDIR/etc/shadow.orig
fi
cd $BASEDIR/etc
ln -s ../tmp/root/etc/shadow shadow
exit 0
