Skip to contentSkip to conversation

sysvinit: install new cmds and fix inittab

PATCH New Ryan Barnett 2 participants 2 messages Oct 30, 2013 – Nov 1, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sysvinit: install new cmds and fix inittab

Adding support for sysvinit to install reboot, poweroff, and pidof commands available in /sbin.

Fixes bug #6620

Removed uninstall commands since they aren't used.

There is an error with sysvinit that will prevent the system from booting if "dshm::sysinit:/bin/mkdir -p /dev/shm" is not present in the inittab.

---
 package/sysvinit/inittab     |    1 +
 package/sysvinit/sysvinit.mk |   11 ++++-------
 2 files changed, 5 insertions(+), 7 deletions(-)
package/sysvinit/inittab +1 -0
index afa0dc3..c85e75a 100644
@@ -7,6 +7,7 @@ id:1:initdefault:
 proc::sysinit:/bin/mount -t proc proc /proc
 rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
 dpts::sysinit:/bin/mkdir -p /dev/pts
+dshm::sysinit:/bin/mkdir -p /dev/shm
 moun::sysinit:/bin/mount -a
 host::sysinit:/bin/hostname -F /etc/hostname
 init::sysinit:/etc/init.d/rcS
package/sysvinit/sysvinit.mk +4 -7
index 131c63f..07bfc6f 100644
@@ -31,18 +31,15 @@ define SYSVINIT_BUILD_CMDS
 endef
 
 define SYSVINIT_INSTALL_TARGET_CMDS
-	for x in halt init shutdown; do \
+	for x in halt init shutdown killall5; do \
 		install -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \
 	done
 	# Override Busybox's inittab with an inittab compatible with
 	# sysvinit
 	install -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab
-endef
-
-define SYSVINIT_UNINSTALL_TARGET_CMDS
-	for x in halt init shutdown; do \
-		rm -f $(TARGET_DIR)/sbin/$$x || exit 1; \
-	done
+	ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot
+	ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff
+	ln -sf killall5 $(TARGET_DIR)/sbin/pidof
 endef
 
 define SYSVINIT_CLEAN_CMDS
Signature · 1 line
1.7.1
#1 lore raw

PATCH v2 1/1 sysvinit: install new cmds and fix inittab

Dear Ryan Barnett,

Quoted 7 lines · Ryan Barnett

Adding support for sysvinit to install reboot, poweroff, and pidof commands available in /sbin.

Fixes bug #6620

Removed uninstall commands since they aren't used.

Quoted 8 lines

There is an error with sysvinit that will prevent the system from booting if "dshm::sysinit:/bin/mkdir -p /dev/shm" is not present in the inittab.

---
 package/sysvinit/inittab     |    1 +
 package/sysvinit/sysvinit.mk |   11 ++++-------
 2 files changed, 5 insertions(+), 7 deletions(-)

Applied to for-peter-2013.11, thanks!

Thomas

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