Install the default script only if one was not found from the platform.
author"Steven J. Hill" <sjhill@realitydiluted.com>
Mon, 7 May 2007 04:01:58 +0000 (04:01 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Mon, 7 May 2007 04:01:58 +0000 (04:01 -0000)
package/tftpd/tftpd.mk

index 25dc98aba64053fb888adefc155daace50f1d55e..69d15d910a3493522e850aa1179ca9c31ad5c2bd 100644 (file)
@@ -58,13 +58,15 @@ $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY): $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY)
            set -x; \
            rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); \
            cp -a $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi ;
-       $(INSTALL) -D -m 0755 package/tftpd/init-tftpd $(TARGET_DIR)/etc/init.d/S80tftpd-hpa
+       @if [ ! -f $(TARGET_DIR)/etc/init.d/S80tftpd-hpa ] ; then \
+               $(INSTALL) -m 0755 -D package/tftpd/init-tftpd $(TARGET_DIR)/etc/init.d/S80tftpd-hpa; \
+       fi;
 
 tftpd: uclibc $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY)
 
 tftpd-clean:
-       rm -rf $(TARGET_DIR)/etc/init.d/S80tftpd-hpa
-       rm -rf $(TARGET_DIR)/usr/sbin/in.tftpd
+       rm -f $(TARGET_DIR)/etc/init.d/S80tftpd-hpa
+       rm -f $(TARGET_DIR)/usr/sbin/in.tftpd
        -$(MAKE) -C $(TFTP_HPA_DIR) clean
 
 tftpd-dirclean: