From c33ba6a4777e454b75c9afc2dd0fe7a955d2ab00 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 30 Dec 2017 18:31:26 +0100 Subject: [PATCH] Remove reboot symlinks properly on uninstall Signed-off-by: Joachim Nilsson --- src/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index bebd6c14..6c99749d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -93,9 +93,10 @@ uninstall-hook: echo "Non-finit reboot, skipping uninstall."; \ else \ for file in $(REBOOT_LNKS); do \ - if [ "`readlink $$file`" != "reboot" ]; \ + link=$(DESTDIR)$(sbindir)/$$file; \ + if [ "`readlink $$link`" != "reboot" ]; \ then continue; \ fi; \ - $(RM) $(DESTDIR)$(sbindir)/$$file; \ + $(RM) $$link; \ done; \ fi