Dracut changes from F17 to F18 (was Load anaconda-lib.sh if necessary)
On Wed, 2012-08-15 at 06:39 -0700, Brian C. Lane wrote:
> On Tue, Aug 14, 2012 at 10:39:30PM -0700, Jesse Keating wrote:
> > For some reason right now this library is not being imported at the time
> > repo-genrules.sh is being ran, so add a stub that forces the import
> > since we need the $rulesfile variable.
> Ack. Although I'd like to figure out why this has changed and what other
> fallout there will be from whatever the root cause is.
For the record, here's what's changed: F18 dracut is using systemd in
The overall flow of dracut remains basically the same, but instead
of /init being dracut's 99base/init.sh, it's systemd.
The dracut systemd setup uses basic.target as its default target, with a
bunch of dracut services added to basic.target.wants.
The dracut services run the dracut hooks, as follows:
So the main difference (and the cause of the problem) is that each
service runs a *different* shell process, when previously they all ran
in the same shell.
On the plus side, exported variables *are* deliberately passed on to the
subsequent services/hooks. Everything else gets lost.
1) We need to import libraries (e.g. anaconda-lib.sh) in each hook. It
doesn't need to happen in each individual *script*, but you need to be
sure that either a) your script imports the library, or b) a previous
script definitely imports it for you.
2) Variables that need to be passed between hooks (e.g. '$kickstart')
must be exported to ensure they'll be visible in later hooks.
We should review the code to make sure it all works as expected. So far
everything seems OK, but some patches might be forthcoming if I find
Hope that helps,
Anaconda-devel-list mailing list