Skip to contentSkip to conversation

add insserv to use LSB compliant init scripts and dynamically configure init order

PATCH New heiko at zuerker.org 2 participants 3 messages Dec 5, 2010 – Dec 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add insserv to use LSB compliant init scripts and dynamically configure init order

From: Heiko Zuerker <[email protected]>

---
 package/Config.in          |    1 +
 package/insserv/Config.in  |    7 ++++++
 package/insserv/insserv.mk |   45 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 package/insserv/Config.in
 create mode 100644 package/insserv/insserv.mk
package/Config.in +1 -0
index 678db20..23636b7 100644
@@ -469,6 +469,7 @@ endmenu
 menu "System tools"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/bootutils/Config.in"
+source "package/insserv/Config.in"
 source "package/module-init-tools/Config.in"
 source "package/procps/Config.in"
 source "package/psmisc/Config.in"
package/insserv/Config.in new file +7 -0
new file mode 100644
index 0000000..1d968dc
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_INSSERV
+	bool "insserv"
+	help
+	  This small package provides a tool for process controlling
+	  in System V boot scripts.
+	  It works for LSB compliant init scripts.
+	  http://wiki.debian.org/LSBInitScripts
package/insserv/insserv.mk new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 1/1 add insserv to use LSB compliant init scripts and dynamically configure init order

Hello,

package/insserv/Config.in line 7

Quoted 7 lines · On Sun, 5 Dec 2010 16:26:19 -0600 heiko at zuerker.org wrote:
package/insserv/Config.in new file +7 -0
+config BR2_PACKAGE_INSSERV
+	bool "insserv"
+	help
+	  This small package provides a tool for process controlling
+	  in System V boot scripts.
+	  It works for LSB compliant init scripts.
+	  http://wiki.debian.org/LSBInitScripts

Just curious, how do you use this in the context of Buildroot ?

By default, Buildroot uses Busybox init, which isn't SysV compliant (it doesn't support runlevels). And how would this interact with the Buildroot build process ?

package/insserv/insserv.mk line 14

Quoted 2 lines
package/insserv/insserv.mk new file +2 -0
+#INSSERV_DEPENDENCIES=zlib
+#HOST_INSSERV_DEPENDENCIES=host-zlib

Useful ? Comments ?

package/insserv/insserv.mk line 26

Quoted 11 lines
package/insserv/insserv.mk new file +11 -0
+define INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef
+
+define HOST_INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef

Those sound strange. Maybe a short comment above would clarify a bit.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 add insserv to use LSB compliant init scripts and dynamically configure init order

Quoting Thomas Petazzoni <[email protected]>:

Quoted 5 lines

Hello,

On Sun, 5 Dec 2010 16:26:19 -0600
heiko at zuerker.org wrote:

Quoted 9 lines

package/insserv/Config.in line 7

Quoted 7 lines
package/insserv/Config.in new file +7 -0
+config BR2_PACKAGE_INSSERV
+	bool "insserv"
+	help
+	  This small package provides a tool for process controlling
+	  in System V boot scripts.
+	  It works for LSB compliant init scripts.
+	  http://wiki.debian.org/LSBInitScripts

Just curious, how do you use this in the context of Buildroot ?

I'm currently trying to get buildroot working as a build system for Devil-Linux.
Unfortunately I can't go the minimalistic route with most things, since I need to stay aligned with the current stable release.

Quoted 3 lines

By default, Buildroot uses Busybox init, which isn't SysV compliant (it doesn't support runlevels). And how would this interact with the Buildroot build process ?

I call it as part of BR2_ROOTFS_POST_BUILD_SCRIPT, in order to get the init scripts ordered initially.
Later we do use insserv during upgrades, to fix any new dependencies.

Insserv works only with BR2_PACKAGE_SYSVINIT, maybe I should add this as a dependency.

Quoted 4 lines

package/insserv/insserv.mk line 14

Quoted 2 lines
package/insserv/insserv.mk new file +2 -0
+#INSSERV_DEPENDENCIES=zlib
+#HOST_INSSERV_DEPENDENCIES=host-zlib

Useful ? Comments ?

Nope, just me forgetting to clean up my stuff after I copy scripts.

Quoted 5 lines
Quoted 5 lines
package/insserv/insserv.mk new file +5 -0
+define INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef
Quoted 8 lines

package/insserv/insserv.mk line 26

Quoted 6 lines
package/insserv/insserv.mk new file +6 -0
+
+define HOST_INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef

Those sound strange. Maybe a short comment above would clarify a bit.

Okay I'll add that.
It's basically just disabling some tests, which would fail otherwise.

Quoted 1 line

Thanks!

I'm still learning how buildroot works, so my apologies for any patches I sent in which need fixing.

Signature · 7 lines
Regards
   Heiko Zuerker
   http://www.devil-linux.org


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.