From: Harald Hoyer Date: Fri, 20 Jul 2012 09:34:40 +0000 (+0200) Subject: dracut: add option --kver= X-Git-Tag: 021~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e65caf369619c596c9a3654511ae9f0a654b6869;p=thirdparty%2Fdracut.git dracut: add option --kver= --- diff --git a/dracut.8.asc b/dracut.8.asc index 619fcaf66..0cd1663f6 100644 --- a/dracut.8.asc +++ b/dracut.8.asc @@ -26,6 +26,13 @@ For a complete list of kernel command line options see *dracut.cmdline*(7) OPTIONS ------- +**--kver** __:: + set the kernel version. This enables to specify the kernel version, without + specifying the location of the initramfs image. For example: +---- +# dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 +---- + **-f, --force**:: overwrite existing initramfs file. diff --git a/dracut.asc b/dracut.asc index e1f756ce3..ca896ee71 100644 --- a/dracut.asc +++ b/dracut.asc @@ -154,7 +154,7 @@ To generate an image for a specific kernel version, the command would be: A shortcut to generate the image at the default location for a specific kernel version is: ---- -# dracut '' 2.6.40-1.rc5.f20 +# dracut --kver 2.6.40-1.rc5.f20 ---- If you want to create lighter, smaller initramfs images, you may want to specify diff --git a/dracut.sh b/dracut.sh index afd076ab0..ffdcbccb5 100755 --- a/dracut.sh +++ b/dracut.sh @@ -67,6 +67,7 @@ Version: $DRACUT_VERSION Creates initial ramdisk images for preloading modules + --kver [VERSION] Set kernel version to [VERSION]. -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 @@ -244,6 +245,7 @@ set -- "${@/%-i/++include}" TEMP=$(unset POSIXLY_CORRECT; getopt \ -o "a:m:o:d:I:k:c:L:fvqlHhM" \ + --long kver: \ --long add: \ --long force-add: \ --long add-drivers: \ @@ -308,6 +310,7 @@ eval set -- "$TEMP" while :; do case $1 in + --kver) kernel="$2"; shift;; -a|--add) push add_dracutmodules_l "$2"; shift;; --force-add) push force_add_dracutmodules_l "$2"; shift;; --add-drivers) push add_drivers_l "$2"; shift;;