summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-core/multitech/config/config.init11
1 files changed, 9 insertions, 2 deletions
diff --git a/recipes-core/multitech/config/config.init b/recipes-core/multitech/config/config.init
index 282b0bb..2a1e0b5 100644
--- a/recipes-core/multitech/config/config.init
+++ b/recipes-core/multitech/config/config.init
@@ -145,6 +145,11 @@ function copydir {
ln -sf "$to/$newdir" "$from"
else
mkdir "$to/$newdir" >/dev/null 2>&1 || true
+ if [[ -L $from ]] ; then
+ # If we have a symlink to a directory,
+ # skip copying any files.
+ return 0
+ fi
savedir=$(pwd)
cd "$from"
for f in * ; do
@@ -285,8 +290,10 @@ case $1 in
rm -rf /etc/$file
ln -sf ${CONFIG_DIR}/$file /etc/$file
else
- rm -f "/etc/${file}/*"
- linkdir "${CONFIG_DIR}/${file}" "/etc/${file}"
+ if ! [[ -L "/etc/${file}" ]] ; then
+ rm -f "/etc/${file}/*"
+ linkdir "${CONFIG_DIR}/${file}" "/etc/${file}"
+ fi
fi
done
;;