summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 10:07:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 10:28:10 +0000
commita2a8a32dce105e1a93e3313d69674add92fac68b (patch)
tree6fa6bae93424149635f6f7e40f487a6440ebc5e0
parentRun dehydration registration only when no account is already present. (diff)
downloadopen-infrastructure-service-tools-a2a8a32dce105e1a93e3313d69674add92fac68b.tar.xz
open-infrastructure-service-tools-a2a8a32dce105e1a93e3313d69674add92fac68b.zip
Actually moving dehydrated directory if needed.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-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