diff -r 732d482f47c8 -r 452f79a5ad71 tools/Makefile --- a/tools/Makefile Wed May 12 21:17:59 2021 +0200 +++ b/tools/Makefile Thu May 13 13:49:04 2021 +0200 @@ -2,12 +2,7 @@ include ../Makefile.global -#SRCS = $(wildcard *.c) -#HDRS = $(wildcard *.h) -#OBJS = $(SRCS:.c=.o) -#SLIBS = -lpthread -#TARGET = thermferm -OTHER = Makefile thermferm.init +OTHER = Makefile init.debian init.slackware setup.slackware ############################################################################# @@ -21,8 +16,19 @@ rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak install: - ${INSTALL} -c -g root -o root -m 0755 thermferm.init /etc/init.d/thermferm - [ -x /bin/systemctl ] && /bin/systemctl daemon-reload + @if [ -x /lib/systemd/systemd ]; then \ + ${INSTALL} -c -g root -o root -m 0755 init.debian /etc/init.d/thermferm ; \ + echo "${INSTALL} -c -g root -o root -m 0755 init.debian /etc/init.d/thermferm" ; \ + [ -x /bin/systemctl ] && /bin/systemctl daemon-reload ; \ + echo "[ -x /bin/systemctl ] && /bin/systemctl daemon-reload" ; \ + elif [ -f /etc/slackware-version ]; then \ + ${INSTALL} -c -g root -o root -m 0755 init.slackware /etc/rc.d/init.d/thermferm ; \ + echo "${INSTALL} -c -g root -o root -m 0755 init.slackware /etc/rc.d/init.d/thermferm" ; \ + ${INSTALL} -c -g root -o root -m 0755 setup.slackware /var/lib/pkgtools/setup/setup.thermferm ; \ + echo "${INSTALL} -c -g root -o root -m 0755 setup.slackware /var/lib/pkgtools/setup/setup.thermferm" ; \ + else \ + echo "Unsupported distribution" ; \ + fi filelist: Makefile BASE=`pwd`; \