From a8183b0559c0b12de5a0e2ec053751f640d56994 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 22 Jan 2018 20:45:05 +0100 Subject: [PATCH] Check if symlink exists before trying to create symlink Signed-off-by: Joachim Nilsson --- contrib/alpine/finit.d/Makefile.am | 5 +++-- contrib/debian/finit.d/Makefile.am | 2 +- contrib/void/finit.d/Makefile.am | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/alpine/finit.d/Makefile.am b/contrib/alpine/finit.d/Makefile.am index eee25c92..65f4f564 100644 --- a/contrib/alpine/finit.d/Makefile.am +++ b/contrib/alpine/finit.d/Makefile.am @@ -1,13 +1,14 @@ SUBDIRS = available docsdir := @docdir@/contrib/alpine/finit.d -d_LINKS = dropbear.conf getty.conf keymap.conf modules.conf klogd.conf syslogd.conf +d_LINKS = dropbear.conf getty.conf keymap.conf modules.conf klogd.conf \ + syslogd.conf install-exec-hook: @$(MKDIR_P) $(DESTDIR)$(docsdir) @for file in $(d_LINKS); do \ lnk=$(DESTDIR)$(docsdir)/$$file; \ src=available/$$file; \ - if [ -e $$lnk ]; then \ + if [ -L $$lnk ]; then \ echo "Skipping $$lnk exists."; \ else \ $(LN_S) $$src $$lnk; \ diff --git a/contrib/debian/finit.d/Makefile.am b/contrib/debian/finit.d/Makefile.am index 13725e80..9b61d24f 100644 --- a/contrib/debian/finit.d/Makefile.am +++ b/contrib/debian/finit.d/Makefile.am @@ -8,7 +8,7 @@ install-exec-hook: @for file in $(d_LINKS); do \ lnk=$(DESTDIR)$(docsdir)/$$file; \ src=available/$$file; \ - if [ -e $$lnk ]; then \ + if [ -L $$lnk ]; then \ echo "Skipping $$lnk exists."; \ else \ $(LN_S) $$src $$lnk; \ diff --git a/contrib/void/finit.d/Makefile.am b/contrib/void/finit.d/Makefile.am index 4b619660..d8c725c1 100644 --- a/contrib/void/finit.d/Makefile.am +++ b/contrib/void/finit.d/Makefile.am @@ -7,7 +7,7 @@ install-exec-hook: @for file in $(d_LINKS); do \ lnk=$(DESTDIR)$(docsdir)/$$file; \ src=available/$$file; \ - if [ -e $$lnk ]; then \ + if [ -L $$lnk ]; then \ echo "Skipping $$lnk exists."; \ else \ $(LN_S) $$src $$lnk; \