Browse Source

-I parameter allows you specify an arbitary file to install in the initrd image.

-H becomes --hostonly because -h is already taken by --help.
master
Andreas Thienemann 15 years ago committed by Warren Togami
parent
commit
39ff06820f
  1. 26
      dracut

26
dracut

@ -14,13 +14,13 @@ usage() { @@ -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 @@ -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 @@ -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* @@ -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"; )

Loading…
Cancel
Save