From b8f4a435e060ea3171fb658cdfd6b7b7b59560de Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 17 Dec 2018 16:34:10 +0100 Subject: [PATCH] new: [docker-host] be much more strict in the way to handle creation of links and updates. --- precise/host/hooks/install.d/70-0k.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/precise/host/hooks/install.d/70-0k.sh b/precise/host/hooks/install.d/70-0k.sh index 8f01942..4491cea 100755 --- a/precise/host/hooks/install.d/70-0k.sh +++ b/precise/host/hooks/install.d/70-0k.sh @@ -71,7 +71,7 @@ fi git clone $GIT_0K_CLONE_OPTIONS "$GIT_0K_BASE/0k/0k-charm.git" fi - ln -sfn /opt/apps/0k-charm/bin/charm /usr/local/sbin/ + ln -sfn /opt/apps/0k-charm/bin/charm /usr/local/sbin/charm ) @@ -147,7 +147,7 @@ fi ln -sfn /opt/apps/0k-docker/bin/* /usr/local/sbin/ ln -sfn /opt/apps/0k-docker/bin/docker-clean /etc/cron.daily/docker-clean ## in update, will remove broken links to binaries that were removed - find -L /usr/local/sbin -maxdepth 1 -type l -delete + find -L /usr/local/sbin -maxdepth 1 -type l -ilname /opt/apps/0k-docker/\* -delete ) @@ -207,7 +207,7 @@ else mkdir -p /opt/apps && cd /opt/apps git clone "$GIT_0K_BASE"/0k/0k-compose.git fi -[ -e /usr/local/bin/compose ] || ln -sfv /opt/apps/0k-compose/bin/compose /usr/local/bin/ +[ -e /usr/local/bin/compose ] || ln -sfnv /opt/apps/0k-compose/bin/compose /usr/local/bin/ rm -rf /var/cache/compose @@ -253,8 +253,8 @@ fi git checkout master fi - ln -sf /opt/apps/0k-pgm/bin/* /usr/local/bin/ + ln -sfnv /opt/apps/0k-pgm/bin/* /usr/local/bin/ + find -L /usr/local/bin -maxdepth 1 -type l -ilname /opt/apps/0k-pgm/bin/\* -delete apt-get install -y --force-yes pv buffer < /dev/null apt-get install -y postgresql-client