Until now the TA directory with all existing TA's was being removed on first
tef-simulator installation. As a result the sesion to installed TA's could not
be opened.
To avoid potential problems resulting from incorrect installation order, save
existing TA's before recreating the TA store link.
Change-Id: I5707a547fa384f9eaab0a5b4ddc40afe53bf7161
fi
%post
-# do it always in case the path was changed
-rm -rf %{link_tastore_dir}
+
+if [ -d %{link_tastore_dir} ]
+then
+ # move existing TAs to the correct dir unless link already points to it
+ if [ `readlink -f %{link_tastore_dir}` != `readlink -f %{tastore_dir}` ]
+ then
+ mv -v %{link_tastore_dir}/* %{tastore_dir}/
+ fi
+
+ # do it always in case the target path was changed
+ rm -rf %{link_tastore_dir}
+fi
+
mkdir -p `dirname %{link_tastore_dir}`
ln -sf %{tastore_dir} %{link_tastore_dir}