Dracut changes from F17 to F18 (was Re: [PATCH] Load anaconda-lib.sh if necessary)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
initramfs.

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:

  dracut-cmdline.service       (cmdline)
  dracut-pre-udev.service      (pre-udev)
  dracut-pre-trigger.service   (pre-trigger)
  dracut-initqueue.service     (initqueue/*, pre-mount, mount)
  dracut-pre-pivot.service     (pre-pivot, cleanup)

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.

This means:

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
anything weird.

Hope that helps,

-w

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux