diff mbox

[PATCHv3,13/74] samba: use <pkg>_INSTALL_INIT_SYSV mechanism

Message ID 1417357142-14307-14-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni Nov. 30, 2014, 2:18 p.m. UTC
Also makes the installation of the init script unconditional.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/samba/samba.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Yann E. MORIN Nov. 30, 2014, 3:09 p.m. UTC | #1
Thomas, All,

On 2014-11-30 15:18 +0100, Thomas Petazzoni spake thusly:
> Also makes the installation of the init script unconditional.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/samba/samba.mk | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/package/samba/samba.mk b/package/samba/samba.mk
> index ec8e6ec..92bbe4e 100644
> --- a/package/samba/samba.mk
> +++ b/package/samba/samba.mk
> @@ -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

OK, I won't repeat it ad-infinitum, so here it is for the last time:
don't we want to remove the check for the existing target, and just
always do the installation, to delegate the customisation to a
post-build script or a rootfs-overlay?

Of course, that can/should be part of a separate patch.

Promised, that's the last time I write this comment in this series! ;-p

>  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

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  $(eval $(autotools-package))
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Peter Korsgaard Dec. 1, 2014, 9:50 p.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Also makes the installation of the init script unconditional.
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.
diff mbox

Patch

diff --git a/package/samba/samba.mk b/package/samba/samba.mk
index ec8e6ec..92bbe4e 100644
--- a/package/samba/samba.mk
+++ b/package/samba/samba.mk
@@ -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))