Bug 6376 - update-rc.d cannot handle priority of '08' or '09' well
Summary: update-rc.d cannot handle priority of '08' or '09' well
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.7 M1
Assignee: Chen Qi
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-05-27 03:34 UTC by Chen Qi
Modified: 2014-10-09 14:28 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2014-05-27 03:34:28 UTC
If we specify a priority of '08' or '09' in INITSCRIPT_PARAMS like below, the priority would not end up correct in our target.

INITSCRIPT_PARAMS = "start 09 S . stop 90 0 6 ."

(Obviously, the above is a valid statement.)

The problem is that the update-rc.d treats numbers begin with '0' as octal numbers.

This needs to be fixed.

//Chen Qi
Comment 1 Chen Qi 2014-06-03 01:45:18 UTC
Module: openembedded-core.git
Branch: master
Commit: 675fd834b9ed696cd87809830d57d3da083580d3
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=675fd834b9ed696cd87809830d57d3da083580d3
Comment 2 Costin 2014-08-18 13:10:22 UTC
Hello Chen,

I know this might sound stupid, but where exactly you inserted the INITSCRIPT_PARAMS variable and what steps did you perform to create the environment for this scenario?

Thank you,

Costin
Comment 3 Chen Qi 2014-08-19 02:31:56 UTC
(In reply to comment #2)
> Hello Chen,
> 
> I know this might sound stupid, but where exactly you inserted the
> INITSCRIPT_PARAMS variable and what steps did you perform to create the
> environment for this scenario?
> 
> Thank you,
> 
> Costin

I created a new recipe with a simple init script, and then set INITSCRIPT_PARAMS to "start 09 S . stop 90 0 6 .".

// Chen Qi
Comment 4 Costin 2014-10-09 14:28:19 UTC
Hello,

I managed to test this bug (thanks for help Chen) and everything is fine. I will mark it as verified.

However, I would like to share how  I did it for future reference:

1) modify the meta/recipes-connectivity/openssh/openssh_6.6p1.bb recipe changing 

INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" to INITSCRIPT_PARAMS_${PN}-sshd = "defaults 09"

2) in local.conf:
EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"
MACHINE = "qemux86-64"

3) bitbake core-image-minimal

4) runqemu qemux86-64 core-image-minimal
ps | grep ssh  (ssh should exist)
ls /etc/rc*   (and a link to sshd should be present)

poky: 5367855fe56db0c09b8fa7bb423b9de18d11eecc

Costin