Minor, refactor

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-01-22 08:38:52 +01:00
1 parent 7e4e5127c7
commit 8c1d84305d
1 file changed
+10 -9
+10 -9
View File
@@ -69,7 +69,7 @@ install-exec-hook:
@for file in $(INIT_LNKS); do \ @for file in $(INIT_LNKS); do \
lnk=$(DESTDIR)$(sbindir)/$$file; \ lnk=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$lnk ]; then \ if [ -e $$lnk ]; then \
echo "Skipping $$lnk exists already."; \ echo "Skipping $$lnk exists."; \
else \ else \
$(LN_S) finit $$lnk; \ $(LN_S) finit $$lnk; \
fi; \ fi; \
@@ -78,11 +78,11 @@ install-exec-hook:
echo "Non-finit reboot, skipping install."; \ echo "Non-finit reboot, skipping install."; \
else \ else \
for file in $(REBOOT_LNKS); do \ for file in $(REBOOT_LNKS); do \
link=$(DESTDIR)$(sbindir)/$$file; \ lnk=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$link ]; then \ if [ -e $$lnk ]; then \
echo "$$link exists, skipping.";\ echo "Skipping $$lnk exists."; \
else \ else \
$(LN_S) reboot $$link; \ $(LN_S) reboot $$lnk; \
fi; \ fi; \
done; \ done; \
fi fi
@@ -101,10 +101,11 @@ uninstall-hook:
echo "Non-finit reboot, skipping uninstall."; \ echo "Non-finit reboot, skipping uninstall."; \
else \ else \
for file in $(REBOOT_LNKS); do \ for file in $(REBOOT_LNKS); do \
link=$(DESTDIR)$(sbindir)/$$file; \ lnk=$(DESTDIR)$(sbindir)/$$file; \
if [ "`readlink $$link`" != "reboot" ]; \ dst=`readlink $$lnk`; \
then continue; \ if [ "$$dst" != "reboot" ]; then \
continue; \
fi; \ fi; \
$(RM) $$link; \ $(RM) $$lnk; \
done; \ done; \
fi fi