Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28292 - genkernel sometimes generates empty linuxrc in initrd
Summary: genkernel sometimes generates empty linuxrc in initrd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-09 13:50 UTC by Paul Pacheco
Modified: 2003-09-09 22:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix empty linuxrc (genkernel.patch,1.26 KB, patch)
2003-09-09 13:53 UTC, Paul Pacheco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pacheco 2003-09-09 13:50:14 UTC
Sometimes genkernel generates an empty linuxrc inside initrd. This renders the 
initrd unusable. 
 
I attach a patch to fix the problem. 

Reproducible: Sometimes
Steps to Reproduce:
1. run genkernel 
2. mount the generated initrd 
3. check the file linuxrc 
Actual Results:  
The file linuxrc has size 0 

Expected Results:  
The linuxrc should contain a script
Comment 1 Paul Pacheco 2003-09-09 13:53:11 UTC
Created attachment 17361 [details, diff]
Patch to fix empty linuxrc

This patch fixes the problem. The problem is that since linux is multitasking,
sometimes the > redirection starts before the cat cleaning up the file, and the
cat outputs an empty file.

The patch fixes the problem by doing all the replaces inside just one sed
command. Another approach would be to chain all the sed commands with pipes and
the last one doing the >
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2003-09-09 22:03:35 UTC
gack, yep this is bad shell code. Will fix in next release.
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2003-09-09 22:12:43 UTC
fixed in my working 1.7 version, closing...