FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 08-16-2012, 06:03 PM
Will Woods
 
Default 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
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 03:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org