Bug 3697 - '/etc/default/rcS' missing on targets with 'poky-tiny' distro feature
Summary: '/etc/default/rcS' missing on targets with 'poky-tiny' distro feature
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4 M4
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-01-10 03:23 UTC by Chen Qi
Modified: 2013-03-01 09:49 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2013-01-10 03:23:45 UTC
/etc/init.d/hwclock.sh: .: line 23: can't open '/etc/default/rcS'

Here's the root cause:
sysvinit provides /etc/default/rcS.
initscripts and busybox both need /etc/default/rcS.
But there are no dependencies among them. (Of course there should not be.)

So, a seperation of rcS-default from sysvinit is necessary for initscripts and busybox to work correctly.
Comment 1 Darren Hart 2013-01-10 15:50:12 UTC
poky-tiny intentionally does not support system v init. I think the question we need to ask here is why is hwclock.sh getting installed in poky-tiny.
Comment 2 Chen Qi 2013-01-11 02:16:35 UTC
(In reply to comment #1)
> poky-tiny intentionally does not support system v init. I think the question
> we need to ask here is why is hwclock.sh getting installed in poky-tiny.

hwclock.sh is provided by busybox.

The above error was encountered when I was exploring poky-tiny.
After I looked into it a little bit, I found it was actually a dependency issue.

As stated above, there are no dependencies among sysvinit, initscripts and busybox. But initscripts and busybox both need /etc/default/rcS which is currently provided by sysvinit.

As I think there shouldn't be any dependencies between these scripts (because the init system can be replaced, and in this case, by tiny-init), I'd like to seperate rcS-default from sysvinit and let initscripts and busybox depend on it.

What do you think about it?
Comment 3 Darren Hart 2013-01-11 16:38:00 UTC
Interesting. Have you determined why hwclock.sh needs /etc/default/rcS? That might need to be established first.

Are the initscripts useful without sysvinit?

Saul, what are your thoughts on the interdependence of these packages?
Comment 4 Chen Qi 2013-01-28 04:52:52 UTC
Now that initscripts will not be built unless the init manager is sysvinit. I think we could just fix the hwclock.sh script by checking the existence of /etc/default/rcS before souring it.
Comment 5 Chen Qi 2013-02-18 07:39:12 UTC
It seems more reasonable to just check the existence of /etc/default/rcS before sourcing it.
Comment 6 Chen Qi 2013-02-25 03:26:50 UTC
merged into poky/master: b1c887277c67a9a0fb08162edc4cc9aeeb8f400d

http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=416519ec595f59ebeafb95bed2546635cad41559
Comment 7 Yi Zhao 2013-03-01 09:49:42 UTC
Verified with master branch: 0bedc0b80d9b46cbbf4a2c5e120a6aa52cbc7c2e
Run "/etc/init.d/hwclock.sh restart" , there is no such error.