Don't symlink multiple times
Was checking for existence of $jaildir/home -- never exists; will always create new symlink Changed to look for directory or symlink at $jaildir/base/home and respond accordingly
This commit is contained in:
parent
37eabffd9c
commit
ba576b3931
1 changed files with 6 additions and 4 deletions
|
@ -185,10 +185,12 @@ 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
|
||||||
SAVE=\$PWD; cd ${jaildir}/base
|
if [ ! -L "${jaildir}/base/home" ]; then
|
||||||
ln -s usr/home home
|
SAVE=\$PWD; cd ${jaildir}/base
|
||||||
cd \$SAVE; unset SAVE
|
ln -s usr/home home
|
||||||
|
cd \$SAVE; unset SAVE
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -d "${jaildir}/rw" ]; then
|
if [ ! -d "${jaildir}/rw" ]; then
|
||||||
|
|
Loading…
Reference in a new issue