From c6a7ff4d10f4d0f51a585d2b789648164b780c70 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Fri, 14 Nov 2014 14:33:52 +0100 Subject: [PATCH] Additional fixes to make provisioning work in ArchLinux and FreeBSD --- vagrantSandbox/initArchlinuxScript.sh | 2 +- vagrantSandbox/initGeneralScript.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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