Now that DESTDIR is used for the init script installation, we need to
ensure the directories exist prior to placing files in them.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DIR = $(INSTALL) -d -m 755
@rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
@rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
@rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
@rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
@rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
@rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
+ @$(INSTALL_DIR) $(DESTDIR)/etc/init.d
+ @$(INSTALL_DIR) $(DESTDIR)/etc/rc0.d $(DESTDIR)/etc/rc1.d \
+ $(DESTDIR)/etc/rc2.d
@$(INSTALL_PROGRAM) -m 744 bacula-$* $(DESTDIR)/etc/init.d/bacula-$*
# set symlinks for script at startup and shutdown
@ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc0.d/K20bacula-$*
@$(INSTALL_PROGRAM) -m 744 bacula-$* $(DESTDIR)/etc/init.d/bacula-$*
# set symlinks for script at startup and shutdown
@ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc0.d/K20bacula-$*