samba: use <pkg>_INSTALL_INIT_SYSV mechanism
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 30 Nov 2014 14:18:01 +0000 (15:18 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 1 Dec 2014 21:50:13 +0000 (22:50 +0100)
Also makes the installation of the init script unconditional.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/samba/samba.mk

index ec8e6ecb7ec555de2ee4cd639cbfd9863903800c..92bbe4e8258b9a18ec65c85d7c56abb591c7963d 100644 (file)
@@ -176,17 +176,17 @@ ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
 SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION
 endif
 
-define SAMBA_INSTALL_INITSCRIPTS_CONFIG
-       # install start/stop script
-       @if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \
-               $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb; \
-       fi
+define SAMBA_INSTALL_CONFIG
        # install config
        @if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \
                $(INSTALL) -m 0644 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \
        fi
 endef
 
-SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_INITSCRIPTS_CONFIG
+SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_CONFIG
+
+define SAMBA_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb
+endef
 
 $(eval $(autotools-package))