Victor Lowther
27994f9e28
tiny fixup to getarg to make handling more arguments slightly easier
...
This patch series adds support for some common mount arguments that have to be
handled in the initramfs.
It is also available at
http://git.fnordovax.org/dracut/log/?h=handle-more-parameters
2009-02-23 13:22:01 -05:00
Victor Lowther
9cead591ad
Make exec failure not kill init or switch_root.
...
If exec fails, then the shell will die unless the next command
is part of a command list. So, exec $whatever || onoes is the way to go
There are also some minor cleanups that were leftovers from splitting
out switch_root in its current form.
2009-02-23 13:22:01 -05:00
Victor Lowther
3f9c86ab86
Hooks and modules have a .sh extension
...
This makes it trivial to filter out temporary files, editor backups,
package management leftovers, etc. Thanks, Kay for the idea.
2009-02-23 13:22:01 -05:00
Dave Jones
1c25acaac4
Fix typo in hook installation.
...
Spotted by Fatih Aşıcı <fatih@pardus.org.tr>
2009-02-18 13:00:59 -05:00
Victor Lowther
6b0daf2e25
Goodbye, nash. We won't miss you.
...
This supercedes my previous switch_root patches, and applies on top of davej's
repo at git.kernel.org.
Nash is gone. In its place we have a reasonable switch_root implementation.
Of course, this switch_root is written in some rather hideous shell script,
and relies on some rather dodgy hacks. Rewriting in C would help things out.
However, it should be distro-independent, and it gets the job done.
2009-02-17 11:05:46 -05:00
Victor Lowther
c968efbb13
[PATCH 50/50] Some documentation updates
2009-02-16 13:56:51 -05: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
955f8b09ad
[PATCH 44/50] Get rid of echoer script
...
We can use sh -c to accomplish the same goal
Also move cat back on to the list of debugging tools -- all the files we were
using it on in the initrd can use read to accomplish the same goal.
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
0f86847d63
[PATCH 40/50] Rearranged dracut script to make it easier to split things out for
2009-02-16 13:56:42 -05:00
Victor Lowther
6dc8676d8c
[PATCH 39/50] Prefer /bin/dash as /bin/sh on the initrd if it is available.
...
This is mainly for testing purposes -- if something non-POSIX is added to the
on initrd scripts, dash will die horribly.
2009-02-16 13:56:42 -05:00
Victor Lowther
2a3efd82e5
[PATCH 38/50] Missed some non-POSIX substitution in root filesystem label parsing.
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
75ec5873af
[PATCH 36/50] Move cat into the list of required executables
2009-02-16 13:56:42 -05:00
Victor Lowther
7f64a3fee1
[PATCH 35/50] POSIX-ize all the shell scripts that get installed to the initramfs.
...
Also install all the scripts using inst, so that we can install the right
shell interpreter for our scripts. We still install bash as well.
2009-02-16 13:56:42 -05:00
Victor Lowther
4b3f76dbe2
[PATCH 34/50] Use inst to install hooks.
...
This will ensure that pathname mangling is handled correctly, and that
whatever interpreter is handling /bin/sh is installed as /bin/sh
2009-02-16 13:56:42 -05:00
Victor Lowther
ec1ad3347c
[PATCH 33/50] We now have a simple hook structure and 3 defined hook points.
...
Any script placed in /pre-udev will be sourced just before udev starts
device scanning and loading.
Any script placed in /pre-mount will be sourced just before we try to
mount a root filesystem.
Any script placed in /pre-pivot will be sourced just before we switch to the
new root filesystem.
These hooks should be the minimum needed to add back plymouth and deal with
more advanced filesysem mounting needs (multipath, iscsi, nfs, nbd, etc.)
2009-02-16 13:56:42 -05:00
Victor Lowther
cd20f1f6eb
[PATCH 32/50] Created pre-mount hook directory
...
This is for tasks that should run after device discovery, but before
mounting the new rootfs. Things like cryptoroot and resume from hibernate
should go here.
Hooks are sourced, not executed as separate scripts.
2009-02-16 13:56:42 -05:00
Victor Lowther
b32f55156d
[PATCH 31/50] We no longer require plymouth. Remove it from the spec.
2009-02-16 13:56:42 -05:00
Victor Lowther
7924b21279
[PATCH 30/50] We no longer need plymouth.
...
init will ask for a passphrase directly if an encrypted root is detected.
Also, use udevadm settle with a 30 second timeout instead of a hardcoded
30 count loop.
2009-02-16 13:56:41 -05:00
Victor Lowther
933a523af3
[PATCH 29/50] Add echoer script
2009-02-16 13:56:41 -05:00
Victor Lowther
8cc53c16a0
[PATCH 28/50] Remove dependency on plymouth for getroot, pass 1.
2009-02-16 13:56:41 -05:00
Victor Lowther
2c6fc388b0
[PATCH 27/50] Don't leave cruft behind in /tmp
2009-02-16 13:56:41 -05:00
Victor Lowther
bc6b0dec9e
[PATCH 26/50] Make init less noisy and load fs modules for all mounted filesystems
2009-02-16 13:56:41 -05:00
Victor Lowther
213c781797
[PATCH 25/50] Add dmesg to the list of debugging tools
2009-02-16 13:56:41 -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
Victor Lowther
95994c57c5
[PATCH 18/50] outfile processing can fit all on one line, so make it.
2009-02-16 13:56:41 -05:00
Victor Lowther
5a862b968a
[PATCH 17/50] Tighten up the font installation case statement as well.
2009-02-16 13:56:41 -05:00
Victor Lowther
b2b11f5579
[PATCH 16/50] $MNTIMAGE? I thought the install dir was $initdir.
2009-02-16 13:56:41 -05:00
Victor Lowther
dce3f50a7d
[PATCH 15/50] Tighten up the keymap installation case statement in dracut.
2009-02-16 13:56:41 -05:00
Victor Lowther
3c3e1e0c49
[PATCH 14/50] Tighten up conditional checking a bit more.
...
Use bash-style conditionals where ever it makes things shorter
and easier to read.
2009-02-16 13:56:41 -05:00
Victor Lowther
535df36653
[PATCH 13/50] Missed an instance of $initdir not being quoted.
2009-02-16 13:56:41 -05:00
Victor Lowther
f9d7779e30
[PATCH 12/50] Get rid of some redundancy when sourcing our functions.
2009-02-16 13:56:41 -05:00
Victor Lowther
e4191d353f
[PATCH 11/50] Quote variable expansion where needed.
...
Otherwise, spaces in some filenames may make things interesting some fine day.
2009-02-16 13:56:40 -05:00
Victor Lowther
c8937ec4a7
[PATCH 10/50] Clean up initialization in dracut.
...
The source keyword is deprecated, and kernel / outfile are more legible as
conditional lists.
2009-02-16 13:56:40 -05:00
Victor Lowther
b368a5f3bb
[PATCH 09/50] Compact option processing.
...
Most of the options are one-liners, and the shift can be factored out of
the case expression entirely.
2009-02-16 13:56:40 -05:00
Victor Lowther
70c26b7fce
[PATCH 08/50] Don't load commands into the initrd that are built in to bash.
...
No sense in loading commands that will never be used.
2009-02-16 13:56:40 -05:00
Victor Lowther
8b691309de
[PATCH 07/50] Get rid of `` subprocess expansion when killing udevd.
...
$() subprocess expansion is so much easier to read.
2009-02-16 13:56:40 -05:00
Victor Lowther
39b4c02111
[PATCH 06/50] Bashify results testing for selinux policy loading
2009-02-16 13:56:40 -05:00