From 581727e1bf319a7abfa16144006ca69fa24a8477 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 23:34:19 +0100 Subject: [PATCH] ensure no conf/conf is created (ln -s src dst/conf createst dst/conf/src if conf exists as a dir) Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index b376912a..68c86be9 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -42,6 +42,9 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" # Init base mkdir -p "$__cdist_local_base_dir" +# Ensure there is no old link, otherwise the new link is created below the old +rm -f "$__cdist_local_base_dir/$__cdist_name_conf_dir" + # Link configuration source directory - consistent with remote ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir"