diff mbox

[1/2] dropbear: install start script only if it doesn't already exists

Message ID 1421753394-32029-1-git-send-email-richard.genoud@gmail.com
State Rejected
Headers show

Commit Message

Richard Genoud Jan. 20, 2015, 11:29 a.m. UTC
That way, we can use a different start script in a custom skeleton.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 package/dropbear/dropbear.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Jan. 20, 2015, 4:22 p.m. UTC | #1
Dear Richard Genoud,

On Tue, 20 Jan 2015 12:29:53 +0100, Richard Genoud wrote:
> That way, we can use a different start script in a custom skeleton.
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> ---
>  package/dropbear/dropbear.mk | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Sorry, but we precisely recently removed such conditions, because they
are not needed.

Don't use a custom skeleton, instead use a post-build script or a
rootfs overlay. With both of those methods, your custom init script
will take precedence over the one installed by Buildroot.

Thanks,

Thomas
Richard Genoud Jan. 23, 2015, 2:43 p.m. UTC | #2
2015-01-20 17:22 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Dear Richard Genoud,
>
> On Tue, 20 Jan 2015 12:29:53 +0100, Richard Genoud wrote:
>> That way, we can use a different start script in a custom skeleton.
>>
>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>> ---
>>  package/dropbear/dropbear.mk | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> Sorry, but we precisely recently removed such conditions, because they
> are not needed.
>
> Don't use a custom skeleton, instead use a post-build script or a
> rootfs overlay. With both of those methods, your custom init script
> will take precedence over the one installed by Buildroot.

Ok, I'll look into the rootfs overlay.

Thanks !
diff mbox

Patch

diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index 696095dc4f40..ab2456dae0bd 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -54,8 +54,9 @@  endef
 
 ifeq ($(BR2_USE_MMU),y)
 define DROPBEAR_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
-		$(TARGET_DIR)/etc/init.d/S50dropbear
+	[ -f $(TARGET_DIR)/etc/init.d/S50dropbear ] || \
+		$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
+			$(TARGET_DIR)/etc/init.d/S50dropbear
 endef
 else
 DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE