]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
-I parameter allows you specify an arbitary file to install in the initrd image.
authorAndreas Thienemann <andreas@bawue.net>
Sun, 24 May 2009 02:10:52 +0000 (22:10 -0400)
committerWarren Togami <wtogami@redhat.com>
Sun, 24 May 2009 02:10:52 +0000 (22:10 -0400)
-H becomes --hostonly because -h is already taken by --help.

dracut

diff --git a/dracut b/dracut
index 0170fbb726266de5d29c74f05b089ab1ad709ab2..7c98d04283cf5ee90fd45830242893137dc9650b 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -14,13 +14,13 @@ usage() {
        echo "Usage: $0 [OPTION]... <initramfs> <kernel-version>
 Creates initial ramdisk images for preloading modules
 
-  -f, --force           Overwrite existing initramfs file
+  -f, --force           Overwrite existing initramfs file.
   -m, --modules [LIST]  Specify a space-separated list of dracut modules to
                          call when building the initramfs. Modules are located
-                         in /usr/lib/dracut/modules.d
-  -o, --omit [LIST]     Omit a space-separated list of dracut modules
+                         in /usr/lib/dracut/modules.d.
+  -o, --omit [LIST]     Omit a space-separated list of dracut modules.
   -d, --drivers [LIST]  Specify a space-separated list of kernel modules to
-                         include in the initramfs
+                         include in the initramfs.
   -h, --help            This message
   --debug               Output debug information of the build process
   -v, --verbose         Verbose output during the build process
@@ -30,11 +30,15 @@ Creates initial ramdisk images for preloading modules
                          directory instead of the system-wide installed in
                          /usr/lib/dracut/modules.d.
                          Useful when running dracut from a git checkout.
-  -h, --hostonly        Host-Only mode: Install only what is needed for
+  -H, --hostonly          Host-Only mode: Install only what is needed for
                          booting the local host instead of a generic host.
   -i, --include [SOURCE] [TARGET]
-                        Include the files in SOURCE in the final initramfs
-  --skip-missing
+                        Include the files in the SOURCE directory into the
+                         Target directory in the final initramfs.
+  -I, --install [LIST]  Install the space separated list of files into the
+                         initramfs.
+  --skip-missing        Do not quit on missing module dependencies but skip
+                         these.
 "
 }
 
@@ -49,8 +53,9 @@ while (($# > 0)); do
        -v|--verbose) beverbose="yes";;
        -c|--conf) conffile="$2"; shift;;
        -l|--local) allowlocal="yes" ;;
-       -h|--hostonly) hostonly="-h" ;;
+       -H|--hostonly) hostonly="-h" ;;
        -i|--include) include_src="$2"; include_target="$3"; shift 2;;
+       -I|--install) install_items="$2"; shift;;
        --skip-missing) skipmissing="yes" ;;
        *) break ;;
     esac
@@ -147,6 +152,11 @@ ldconfig -n -r "$initdir" /lib* /usr/lib*
     cp -a -t "$initdir$include_target" "$include_src"/*
 }
 
+for item in $install_items; do
+   dracut_install "$item"
+done
+unset item
+
 [[ "$beverbose" = "yes" ]] && (du -c "$initdir" | sort -n)
 
 ( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )