Merge pull request #85 from jdguffey/__jail

Don't symlink multiple times
This commit is contained in:
Nico Schottelius 2012-06-21 23:42:30 -07:00
commit 0cae1b44f9

View file

@ -185,12 +185,14 @@ cat <<EOF
if [ ! -d "${jaildir}/base/usr/home" ]; then if [ ! -d "${jaildir}/base/usr/home" ]; then
mkdir -p "${jaildir}/base/usr/home" mkdir -p "${jaildir}/base/usr/home"
fi fi
if [ ! -d "${jaildir}/home" ]; then if [ ! -d "${jaildir}/base/home" ]; then
if [ ! -L "${jaildir}/base/home" ]; then
SAVE=\$PWD; cd ${jaildir}/base SAVE=\$PWD; cd ${jaildir}/base
ln -s usr/home home ln -s usr/home home
cd \$SAVE; unset SAVE cd \$SAVE; unset SAVE
fi fi
fi fi
fi
if [ ! -d "${jaildir}/rw" ]; then if [ ! -d "${jaildir}/rw" ]; then
mkdir "${jaildir}/rw" mkdir "${jaildir}/rw"
fi fi