Add --dracut cmdline argument to use dracut for --mkinitrd, this is needed for %post generation of dracut initrd's to which we are moving due to GPL concerns about shipping pre build initrd's --- new-kernel-pkg | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/new-kernel-pkg b/new-kernel-pkg index bb4cbb1..dfe2e10 100755 --- a/new-kernel-pkg +++ b/new-kernel-pkg @@ -82,6 +82,7 @@ fi mode="" version="" initrd="" +dracut="" initrdfile="" moddep="" verbose="" @@ -92,7 +93,7 @@ mbargs="" adddracutargs="" usage() { - echo "Usage: `basename $0` [-v] [--mkinitrd] [--rminitrd]" >&2 + echo "Usage: `basename $0` [-v] [--mkinitrd] [--rminitrd] [--dracut]" >&2 echo " [--initrdfile=<initrd-image>] [--depmod] [--rmmoddep]" >&2 echo " [--kernel-args=<args>] [--remove-args=<args>]" >&2 echo " [--banner=<banner>] [--multiboot=multiboot]" >&2 @@ -269,7 +270,7 @@ update() { } mkinitrd() { - if [ -n "$USEDRACUT" -a -x /sbin/dracut ]; then + if [ -n "$dracut" ]; then tool="/sbin/dracut -f $initrdfile $version" else tool="/sbin/mkinitrd --allow-missing -f $initrdfile $version" @@ -309,6 +310,10 @@ while [ $# -gt 0 ]; do initrd="remove" ;; + --dracut) + dracut=--dracut + ;; + --initrdfile*) if echo $1 | grep '=' >/dev/null ; then initrdfile=`echo $1 | sed 's/^--initrdfile=//'` @@ -432,17 +437,24 @@ fi # set the initrd file based on arch; ia64 is the only currently known oddball if [ -z "$initrdfile" ]; then - if [ `uname -m` = "ia64" ]; then - initrdfile="/boot/efi/EFI/redhat/initrd-$version.img" + if [ -n "$dracut" ]; then + if [ `uname -m` = "ia64" ]; then + initrdfile="/boot/efi/EFI/redhat/dracut-$version.img" + else + initrdfile="/boot/dracut-$version.img" + fi else - initrdfile="/boot/initrd-$version.img" + if [ `uname -m` = "ia64" ]; then + initrdfile="/boot/efi/EFI/redhat/initrd-$version.img" + else + initrdfile="/boot/initrd-$version.img" + fi fi - fi [ -n "$verbose" ] && echo "initrdfile is $initrdfile" # add dracut i18n, keyboard and plymouth kernel args if requested -if [ -n "$adddracutargs" ]; then +if [ -n "$dracut" -o -n "$adddracutargs" ]; then [ -r /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard [ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n -- 1.6.4.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list