summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/open-infrastructure-dehydrated-tools.postinst5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst
index 16f1e4d..a02e661 100755
--- a/debian/open-infrastructure-dehydrated-tools.postinst
+++ b/debian/open-infrastructure-dehydrated-tools.postinst
@@ -52,6 +52,11 @@ Install ()
then
rmdir "${DEFAULT}"
ln -s "${TARGET}" "${DEFAULT}"
+ elif [ -n "$(ls -A ${DEFAULT})" ] && [ -z "$(ls -A ${TARGET})" ]
+ then
+ rmdir "${TARGET}"
+ mv "${DEFAULT}" "${TARGET}"
+ ln -s "${TARGET}" "${DEFAULT}"
fi
fi
fi