logrotate: only install logrotate.conf if not present in target_skeleton
authorPeter Korsgaard <jacmet@sunsite.dk>
Thu, 5 Mar 2009 19:00:17 +0000 (19:00 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 5 Mar 2009 19:00:17 +0000 (19:00 -0000)
Allow platforms to provide a custom logrotate.conf in their target_skeleton.

package/logrotate/logrotate.mk

index 318f27f8ddfad3b4f7c7ed7fb440b1c032cd884f..220204f8bc24ecb3c1626e78dfcc3d5be234daea 100644 (file)
@@ -18,7 +18,9 @@ $(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
 
 $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
        $(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
-       $(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf
+       if [ ! -f $(TARGET_DIR)/etc/logrotate.conf ]; then
+               $(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf;
+       fi
        $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
 
 logrotate: popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)