Patchwork [1/1] netplug: properly install init.d script.

login
register
mail settings
Submitter Peter Sanford
Date Sept. 3, 2013, 5:22 p.m.
Message ID <1378228974-3369-1-git-send-email-psanford@nearbuysystems.com>
Download mbox | patch
Permalink /patch/272356/
State Accepted
Headers show

Comments

Peter Sanford - Sept. 3, 2013, 5:22 p.m.
Looks like this was lost in 20d4792e.

Signed-off-by: Peter Sanford <psanford@nearbuysystems.com>
---
 package/netplug/netplug.mk |    7 +++++++
 1 file changed, 7 insertions(+)
Thomas Petazzoni - Sept. 3, 2013, 7:16 p.m.
Dear Peter Sanford,

On Tue,  3 Sep 2013 10:22:54 -0700, Peter Sanford wrote:
> Looks like this was lost in 20d4792e.
> 
> Signed-off-by: Peter Sanford <psanford@nearbuysystems.com>
> ---
>  package/netplug/netplug.mk |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
> index fbc7a2d..36bd3f7 100644
> --- a/package/netplug/netplug.mk
> +++ b/package/netplug/netplug.mk
> @@ -16,6 +16,13 @@ define NETPLUG_INSTALL_TARGET_CMDS
>  	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
>  endef
>  
> +define NETPLUG_INSTALL_INITSCRIPT
> +	$(INSTALL) -m 0755 -D package/netplug/S29netplug \
> +		$(TARGET_DIR)/etc/init.d/S29netplug
> +endef
> +
> +NETPLUG_POST_INSTALL_TARGET_HOOKS += NETPLUG_INSTALL_INITSCRIPT

Looks good, but it should use NETPLUG_INSTALL_INIT_SYSV instead. See
the Buildroot manual for details,
http://buildroot.org/downloads/manual/manual.html.

Thanks!

Thomas
Peter Korsgaard - Sept. 3, 2013, 10:16 p.m.
>>>>> "Peter" == Peter Sanford <psanford@nearbuysystems.com> writes:

 Peter> Looks like this was lost in 20d4792e.
 Peter> Signed-off-by: Peter Sanford <psanford@nearbuysystems.com>
 Peter> ---
 Peter>  package/netplug/netplug.mk |    7 +++++++
 Peter>  1 file changed, 7 insertions(+)

 Peter> diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
 Peter> index fbc7a2d..36bd3f7 100644
 Peter> --- a/package/netplug/netplug.mk
 Peter> +++ b/package/netplug/netplug.mk
 Peter> @@ -16,6 +16,13 @@ define NETPLUG_INSTALL_TARGET_CMDS
 Peter>  	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
 Peter>  endef
 
 Peter> +define NETPLUG_INSTALL_INITSCRIPT
 Peter> +	$(INSTALL) -m 0755 -D package/netplug/S29netplug \
 Peter> +		$(TARGET_DIR)/etc/init.d/S29netplug
 Peter> +endef

Committed with this changed to use NETPLUG_INSTALL_INIT_SYSV, thanks.

Patch

diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
index fbc7a2d..36bd3f7 100644
--- a/package/netplug/netplug.mk
+++ b/package/netplug/netplug.mk
@@ -16,6 +16,13 @@  define NETPLUG_INSTALL_TARGET_CMDS
 	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
 endef
 
+define NETPLUG_INSTALL_INITSCRIPT
+	$(INSTALL) -m 0755 -D package/netplug/S29netplug \
+		$(TARGET_DIR)/etc/init.d/S29netplug
+endef
+
+NETPLUG_POST_INSTALL_TARGET_HOOKS += NETPLUG_INSTALL_INITSCRIPT
+
 define NETPLUG_UNINSTALL_TARGET_CMDS
 	rm -f $(TARGET_DIR)/sbin/netplugd
 	rm -rf $(TARGET_DIR)/etc/netplug*