Skip to contentSkip to conversation

dropbear: install start script only if it doesn't already exists

PATCH New Richard Genoud 2 participants 4 messages Jan 20, 2015 – Jan 23, 2015

lore
Share & tools
lore
#0 lore raw

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

That way, we can use a different start script in a custom skeleton.

---
 package/dropbear/dropbear.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/dropbear/dropbear.mk +3 -2
index 696095dc4f40..ab2456dae0bd 100644
@@ -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
Signature · 1 line
2.0.0
#1 lore raw

PATCH 2/2 connman: install start script only if it doesn't already exists

That way, we can use a different start script in a custom skeleton.

---
 package/connman/connman.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/connman/connman.mk +2 -1
index 4d9b03ef1508..108ad848e92c 100644
@@ -28,7 +28,8 @@ CONNMAN_DEPENDENCIES += \
 	$(if $(BR2_PACKAGE_CONNMAN_WISPR),gnutls)
 
 define CONNMAN_INSTALL_INIT_SYSV
-	$(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman
+	[ -f $(TARGET_DIR)/etc/init.d/S45connman ] || \
+		$(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman
 endef
 
 
Signature · 1 line
2.0.0
#2 lore raw

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

In reply to Richard Genoud

Dear Richard Genoud,

Quoted 6 lines · Richard Genoud

That way, we can use a different start script in a custom skeleton.

---
 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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

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

2015-01-20 17:22 GMT+01:00 Thomas Petazzoni
<[email protected]>:

Quoted 10 lines

Dear Richard Genoud,

Quoted 6 lines · Richard Genoud

That way, we can use a different start script in a custom skeleton.

---
 package/dropbear/dropbear.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 6 lines

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 !