From a2a8a32dce105e1a93e3313d69674add92fac68b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 28 Aug 2021 12:07:29 +0200 Subject: Actually moving dehydrated directory if needed. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-dehydrated-tools.postinst | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3