From c0b392feadc8ac7af22b4c1b49a084b36341291e Mon Sep 17 00:00:00 2001 From: Ben Walton Date: Fri, 15 Apr 2011 14:17:43 -0400 Subject: [PATCH] Collapse Solaris install-autostart targets Use a patterened rule to install and uninstall the various init scripts for solaris. They're all the same, so reduce the redundancy. Signed-off-by: Ben Walton --- bacula/platforms/solaris/Makefile.in | 63 ++++++---------------------- 1 file changed, 13 insertions(+), 50 deletions(-) diff --git a/bacula/platforms/solaris/Makefile.in b/bacula/platforms/solaris/Makefile.in index df431013e4..0b391eb659 100644 --- a/bacula/platforms/solaris/Makefile.in +++ b/bacula/platforms/solaris/Makefile.in @@ -19,62 +19,25 @@ install: install-autostart install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir - -install-autostart-fd: - @rm -f /etc/rc0.d/K20bacula-fd - @rm -f /etc/rc1.d/S99bacula-fd - @rm -f /etc/rc2.d/S99bacula-fd - @$(INSTALL_PROGRAM) -m 744 bacula-fd /etc/init.d/bacula-fd +install-autostart-%: + @rm -f /etc/rc0.d/K20bacula-$* + @rm -f /etc/rc1.d/S99bacula-$* + @rm -f /etc/rc2.d/S99bacula-$* + @$(INSTALL_PROGRAM) -m 744 bacula-$* /etc/init.d/bacula-$* # set symlinks for script at startup and shutdown - @ln -f -s /etc/init.d/bacula-fd /etc/rc0.d/K20bacula-fd - @ln -f -s /etc/init.d/bacula-fd /etc/rc1.d/S99bacula-fd - @ln -f -s /etc/init.d/bacula-fd /etc/rc2.d/S99bacula-fd - - -install-autostart-sd: - @rm -f /etc/rc0.d/K20bacula-sd - @rm -f /etc/rc1.d/S99bacula-sd - @rm -f /etc/rc2.d/S99bacula-sd - @$(INSTALL_PROGRAM) -m 744 bacula-sd /etc/init.d/bacula-sd - # set symlinks for script at startup and shutdown - @ln -f -s /etc/init.d/bacula-sd /etc/rc0.d/K20bacula-sd - @ln -f -s /etc/init.d/bacula-sd /etc/rc1.d/S99bacula-sd - @ln -f -s /etc/init.d/bacula-sd /etc/rc2.d/S99bacula-sd - - -install-autostart-dir: - @rm -f /etc/rc0.d/K20bacula-dir - @rm -f /etc/rc1.d/S99bacula-dir - @rm -f /etc/rc2.d/S99bacula-dir - @$(INSTALL_PROGRAM) -m 744 bacula-dir /etc/init.d/bacula-dir - # set symlinks for script at startup and shutdown - @ln -f -s /etc/init.d/bacula-dir /etc/rc0.d/K20bacula-dir - @ln -f -s /etc/init.d/bacula-dir /etc/rc1.d/S99bacula-dir - @ln -f -s /etc/init.d/bacula-dir /etc/rc2.d/S99bacula-dir - + @ln -f -s /etc/init.d/bacula-$* /etc/rc0.d/K20bacula-$* + @ln -f -s /etc/init.d/bacula-$* /etc/rc1.d/S99bacula-$* + @ln -f -s /etc/init.d/bacula-$* /etc/rc2.d/S99bacula-$* uninstall: uninstall-autostart uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir -uninstall-autostart-fd: - @rm -f /etc/rc0.d/K20bacula-fd - @rm -f /etc/rc1.d/S99bacula-fd - @rm -f /etc/rc2.d/S99bacula-fd - @rm -f /etc/init.d/bacula-fd - - -uninstall-autostart-sd: - @rm -f /etc/rc0.d/K20bacula-sd - @rm -f /etc/rc1.d/S99bacula-sd - @rm -f /etc/rc2.d/S99bacula-sd - @rm -f /etc/init.d/bacula-sd - -uninstall-autostart-dir: - @rm -f /etc/rc0.d/K20bacula-dir - @rm -f /etc/rc1.d/S99bacula-dir - @rm -f /etc/rc2.d/S99bacula-dir - @rm -f /etc/init.d/bacula-dir +uninstall-autostart-%: + @rm -f /etc/rc0.d/K20bacula-$* + @rm -f /etc/rc1.d/S99bacula-$* + @rm -f /etc/rc2.d/S99bacula-$* + @rm -f /etc/init.d/bacula-$* clean: @rm -f 1 2 3 -- 2.39.5