Skip to contentSkip to conversation

The Skeleton initscript doesn't work on minimal image

PATCH Applied Robert Yang 2 participants 3 messages Aug 15, 2011

lore
Share & tools
lore
#0 lore raw

cover The Skeleton initscript doesn't work on minimal image

Testing:
1) Edit meta/recipes-core/images/core-image-minimal.bb, add "service" to the IMAGE_INSTALL

2) Edit build/conf/local.conf, add "/path/to/poky/meta-skeleton" to the BBLAYERS.

3) $ bitbake core-image-minimal(or sato)

3) start qemu, and run "/etc/init.d/skeleton start(or status stop ..)", it works well

// Robert

The following changes since commit 30381645eefe4e3222fd3ce45823f143ce2fa82c:

rt-tests: use an explicit commit ID (2011-08-12 21:07:02 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/initscripts
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/initscripts

Robert Yang (1):
The Skeleton initscript doesn't work on minimal image

 .../initscripts/initscripts-1.0/functions          |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/1 The Skeleton initscript doesn't work on minimal image

Fixes bug [YOCTO #1165]

The /etc/init.d/skeleton doesn't work on minimal image, this is because of the pidofproc doesn't return "$?" correctly, so store $? in the variable status would fix it.

---
 .../initscripts/initscripts-1.0/functions          |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/functions +3 -2
index c1eac3e..dd7da2b 100644
@@ -18,7 +18,8 @@ pidofproc () {
 
 	# pidof output null when no program is running, so no "2>/dev/null".
 	pid=`pidof $1`
-	case $? in
+	status=$?
+	case $status in
 	0)
 		echo $pid
 		return 0
@@ -28,7 +29,7 @@ pidofproc () {
 		exit 127
 		;;
 	*)
-		return $?
+		return $status
 		;;
 	esac
 }
Signature · 1 line
1.7.1
#2 lore raw
In reply to Robert Yang
Quoted 16 lines · Robert Yang

Testing:
1) Edit meta/recipes-core/images/core-image-minimal.bb, add "service" to the IMAGE_INSTALL

2) Edit build/conf/local.conf, add "/path/to/poky/meta-skeleton" to the BBLAYERS.

3) $ bitbake core-image-minimal(or sato)

3) start qemu, and run "/etc/init.d/skeleton start(or status stop ..)", it works well

// Robert

The following changes since commit 30381645eefe4e3222fd3ce45823f143ce2fa82c:

Quoted 8 lines

rt-tests: use an explicit commit ID (2011-08-12 21:07:02 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/initscripts
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/initscripts

Robert Yang (1):
The Skeleton initscript doesn't work on minimal image

Merged to master, thanks.

Richard