diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 10:07:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 10:28:10 +0000 |
commit | a2a8a32dce105e1a93e3313d69674add92fac68b (patch) | |
tree | 6fa6bae93424149635f6f7e40f487a6440ebc5e0 | |
parent | Run dehydration registration only when no account is already present. (diff) | |
download | open-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-x | debian/open-infrastructure-dehydrated-tools.postinst | 5 |
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 |