diff --git a/vagrantSandbox/initArchlinuxScript.sh b/vagrantSandbox/initArchlinuxScript.sh index 7d03aaad0..74ae5a316 100755 --- a/vagrantSandbox/initArchlinuxScript.sh +++ b/vagrantSandbox/initArchlinuxScript.sh @@ -33,7 +33,7 @@ done # for the used archlinux-Box the /home is too small but / is big enough mkdir /Foam -ln -s /Foam/ /home/vagrant/foam/ +ln -s /Foam/ /home/vagrant/foam chown vagrant:vagrant /Foam echo diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 01448705e..c97db693c 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -18,7 +18,12 @@ done OFDIR=/home/vagrant/foam/ -mkdir -vp $OFDIR +# make sure that a symbolic link is not erased +if [ ! -e $OFDIR ]; then + echo "Making directory $OFDIR" + mkdir -vp $OFDIR +fi + chown -R vagrant:vagrant $OFDIR # for distros that don't have group vagrant @@ -42,7 +47,7 @@ then echo # su -c not correctly working on FreeBSD - su vagrant - -c "git clone $OFParent $OFClone" + su - vagrant -c "git clone $OFParent $OFClone" echo echo "Git cloned: TODO: set same branch as parent" @@ -58,7 +63,7 @@ then echo "Parent is on id $idName" echo "Cloning. This may take some time" - su vagrant - -c "hg clone -u $idName $OFParent $OFClone" + su - vagrant -c "hg clone -u $idName $OFParent $OFClone" echo else echo