"make install" crashes when --enable-install-cron has been used at
configuration stage:
if [ ( -z "/usr/lib/systemd/system" -o ! -d /usr/lib/systemd/system ) -a
! -d /etc/cron.d ]; then \
if [ ! -d /etc/cron.hourly -o ! -d /etc/cron.daily ]; then \
su root -c "crontab -l > /tmp/crontab-root.save"; \
/bin/cp -a /tmp/crontab-root.save ./crontab-root.`date
'+%Y%m%d.%H%M%S'`.save; \
echo "USER'S PREVIOUS CRONTAB SAVED IN CURRENT DIRECTORY
(USING .save SUFFIX)."; \
su root -c "crontab cron/crontab"; \
fi \
fi
/bin/sh: -c: line 0: syntax error near unexpected token `-z'
/bin/sh: -c: line 0: `if [ ( -z "/usr/lib/systemd/system" -o ! -d
/usr/lib/systemd/system ) -a ! -d /etc/cron.d ]; then \'
make: *** [install_all] Error 1
This is because parentheses need to be escaped in Makefile.in.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
fi \
fi
ifeq ($(COPY_ONLY),n)
- if [ ( -z "$(SYSTEMD_UNIT_DIR)" -o ! -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ) -a ! -d $(DESTDIR)/etc/cron.d ]; then \
+ if [ \( -z "$(SYSTEMD_UNIT_DIR)" -o ! -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) \) -a ! -d $(DESTDIR)/etc/cron.d ]; then \
if [ ! -d $(DESTDIR)/etc/cron.hourly -o ! -d $(DESTDIR)/etc/cron.daily ]; then \
su $(CRON_OWNER) -c "crontab -l > /tmp/crontab-$(CRON_OWNER).save"; \
$(CP) -a /tmp/crontab-$(CRON_OWNER).save ./crontab-$(CRON_OWNER).`date '+%Y%m%d.%H%M%S'`.save; \