Commit Graph

29 Commits (c4da24071773dcbb71a050d38c8c3eead90428ab)

Author SHA1 Message Date
Victor Lowther 54b4419653 Fix several inst functions.
Move file existence checking into the individual inst functions. This makes
things a bit easier to understand and maintain.
2009-03-04 17:18:47 +01:00
Victor Lowther 09805e02b8 Get rid of some RedHat specific modules and udev rules
They are not needed to boot with dracut, so away they go.

Also rewrite inst_rules to automatically search likely rule locations when
installing udev rules.
2009-03-04 17:14:53 +01:00
Victor Lowther ca7d88da13 Modify instmods to not rely on the existence of modules.* files
This patch series aims to make dracut more distro-independent.  It includes
some of the functionality that Seewer Philippe posted to the list to make
dracut work on Ubuntu.

depmod does not create these files on all distros (Debian, specifically),
so modify instmods to use pathname components and find to do what we want.

As a bonus, this removes the special-case for =ata.
2009-03-04 17:11:11 +01:00
Seewer Philippe 7bcacaaa5f Create directories for symlinked libraries if needed
Sometimes symlinks for libraries reside in weird places. Create those
weird places if necessary.

--
  dracut-functions |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
2009-03-04 17:10:51 +01:00
Seewer Philippe 9f88fcd94b Canonicalize symlinks
When handling links sometimes one readlink isn't enough. Dracut doesn't
need to clone a whole link series, so just use readlink -f

--
  dracut-functions |    8 +++-----
  1 files changed, 3 insertions(+), 5 deletions(-)
2009-03-04 17:10:03 +01:00
Seewer Philippe 59e3c455b8 Make bash regexes behave
On some systems with newer or unpatched bash versions the whole right
portion of =~ is considered part of the regex. Means we need to get rid
of enclosing ''.

This patch fixes this.

--
  dracut-functions |    8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)
2009-03-04 17:07:46 +01:00
Seewer Philippe 9b88534374 Fix find_binary always succeeding
find_binary inside dracut-functions always succeeds. Independent of
whether the file actually exists or not.

This patch fixes this.

And since we're using the function not only to find binaries at little
enhancement there shouldn't be that bad either.

--
dracut-functions |   21 ++++++++++++++++-----
  1 files changed, 16 insertions(+), 5 deletions(-)
2009-03-04 17:05:58 +01:00
Seewer Philippe acf324172d Fix instmods recursing indefinitely
the instmod function inside dracut-functions starts to recurses indefinitely
if modprobe --show-depends is used and the output contains module options.

Example:

#modprobe --show-depends libata
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/acpi/dock.ko
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/scsi/scsi_mod.ko
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/ata/libata.ko ignore_hpa=1

This patch fixes this.

--
 dracut-functions |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
2009-03-04 17:01:53 +01:00
Victor Lowther 53f954561a [PATCH 49/50] Modify hook loading to make it slightly easier to script.
Modules are now responsible for loading their hooks into the initrd.

This should be all the structure we need to make it easy for things
to integrate with dracut -- now to document and test it all.
2009-02-16 13:56:51 -05:00
Victor Lowther f04dc5f312 [PATCH 48/50] Shift some functionality around, make modules maskable.
Most of our functionality is now in scripts that we source rather than in the
main dracut script.
2009-02-16 13:56:42 -05:00
Victor Lowther f4fff04ef1 [PATCH 47/50] Split out the various things we load into their own modules.
This should make it easier for distros to customize things according to
their preferences.
2009-02-16 13:56:42 -05:00
Victor Lowther bff8c33c2b [PATCH 46/50] fixed library-matching regex
Forgot about /lib64
2009-02-16 13:56:42 -05:00
Victor Lowther aeaaa812d2 [PATCH 45/50] Really die if a library is not found.
Also explain how to find it.
2009-02-16 13:56:42 -05:00
Victor Lowther 7d18dca5c1 [PATCH 43/50] Use ldd to find shared library deps.
This replaces the eu-readelf and ld-linux.so.2 hackery.

As a bonus it will keep working if we (for some bizzare reason) need
to load a non-elf executable or shared library on the initrd.
2009-02-16 13:56:42 -05:00
Victor Lowther 1513676235 [PATCH 42/50] Add very basic module functionality to dracut.
Move the i18n stuff to it.
2009-02-16 13:56:42 -05:00
Victor Lowther 3359c8da84 [PATCH 41/50] dracut will now search for files in the usual binary locations if a 2009-02-16 13:56:42 -05:00
Victor Lowther 8c1faa35c4 [PATCH 37/50] Try to install file as scripts before installing them as binaries
This ensures that scripts will ahve their interpreter isntalled before
they get installed.

Also included a minor fixup that skips library checking if the binary
we are testing is already installed.
2009-02-16 13:56:42 -05:00
Victor Lowther 36b24d7c53 [PATCH 24/50] Replace inst function with a family of specialized functions
This makes things shorter and easier to read.
2009-02-16 13:56:41 -05:00
Victor Lowther 6fa0c3d60b [PATCH 23/50] Rip out old recursive module loading, replace with something simpler
bash allows unlimited recursion and several other tricks to make
finding all the dependencies of a kernel module much simpler.

This nukes about 130 lines, most of it in dracut-functions.

This diff also touches some cleanups made in the inst function.
2009-02-16 13:56:41 -05:00
Victor Lowther 170b260bd9 [PATCH 22/50] Bashify inst function where ot makes things easier to read. 2009-02-16 13:56:41 -05:00
Victor Lowther 8667f2b733 [PATCH 21/50] Simplified get_dso_deps
This takes advantage of several bash specific constructs to make
get_dso_deps easier to read and understand.
2009-02-16 13:56:41 -05:00
Victor Lowther 375a5b4084 [PATCH 20/50] set_verbose is not used anywhere. Buh-bye. 2009-02-16 13:56:41 -05:00
Victor Lowther 6b24de99d9 [PATCH 19/50] The function keyword is deprecated. Get rid of it. 2009-02-16 13:56:41 -05:00
Jeremy Katz a1119a718d Fix module dependency handling
Module dependency handling wasn't being followed correctly; fix it
2009-01-05 15:45:39 -05:00
Jeremy Katz 6eedcafc37 Clean up noise from eu-readelf 2009-01-05 15:42:56 -05:00
Jeremy Katz aabc0553b5 Add first pass of keyboard/console font setup
First pass of keyboard/console font setup.  This ends up being Fedora/RHEL
specific as everyone specifies these things in a different place
2009-01-05 14:40:34 -05:00
Jeremy Katz 0d666d610a Stop depending on nash to find the program interpreter; use eu-readelf instead 2009-01-05 12:47:36 -05:00
Jeremy Katz 5533709cdb plymouth calls set_verbose(), no noop it 2008-12-19 14:43:06 -05:00
Jeremy Katz ab81170e59 Handle locations where we'll be installing files
Handle that files will be in different places once installed
2008-12-18 15:55:28 -05:00