]> granicus.if.org Git - sysstat/commitdiff
Fix installation on systems w/o chkconfig command
authorSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 16 Mar 2015 20:24:59 +0000 (21:24 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 16 Mar 2015 20:24:59 +0000 (21:24 +0100)
On systems without chkconfig command, the variable CHKCONFIG is empty.
Its contents should be enclosed in double quotes to be properly tested.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
Makefile.in

index 6098a8181c4d9bfb8369ab25a7e8a6fadcdba75d..d87576c3588e939ef357f8f4e0b59ff374e05901 100644 (file)
@@ -411,7 +411,7 @@ endif
                $(INSTALL_DATA) cron/sysstat-summary.timer $(DESTDIR)$(SYSTEMD_UNIT_DIR); \
        elif [ -d $(DESTDIR)$(INIT_DIR) ]; then \
                $(INSTALL_BIN) sysstat $(DESTDIR)$(INIT_DIR)/sysstat; \
-               if [ -x $(CHKCONFIG) ]; then \
+               if [ -x "$(CHKCONFIG)" ]; then \
                        cd $(DESTDIR)$(INIT_DIR) && $(CHKCONFIG) --add sysstat; \
                else \
                        [ -d $(DESTDIR)$(RC2_DIR) ] || mkdir -p $(DESTDIR)$(RC2_DIR); \
@@ -423,7 +423,7 @@ endif
                fi \
        elif [ -d $(DESTDIR)$(RC_DIR) ]; then \
                $(INSTALL_BIN) sysstat $(DESTDIR)$(RC_DIR)/rc.sysstat; \
-               if [ -x $(CHKCONFIG) ]; then \
+               if [ -x "$(CHKCONFIG)" ]; then \
                        cd $(DESTDIR)$(RC_DIR) && $(CHKCONFIG) --add rc.sysstat; \
                else \
                        [ -d $(DESTDIR)$(RC2_DIR) ] || mkdir -p $(DESTDIR)$(RC2_DIR); \