dracut-034-18.git20131018
- Fixed LVM with thin provisioning Resolves: rhbz#1013767 - fixed swap detection in host only mode
This commit is contained in:
		
							parent
							
								
									e9174046ca
								
							
						
					
					
						commit
						9323733aa3
					
				
							
								
								
									
										21
									
								
								0007-base-init.sh-also-mkdir-run-lock.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								0007-base-init.sh-also-mkdir-run-lock.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
| From ab2676d29144097239c189b1a6d938e0420eb580 Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 9 Oct 2013 08:20:39 +0200 | ||||
| Subject: [PATCH] base/init.sh: also mkdir /run/lock | ||||
| 
 | ||||
| ---
 | ||||
|  modules.d/99base/init.sh | 1 + | ||||
|  1 file changed, 1 insertion(+) | ||||
| 
 | ||||
| diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
 | ||||
| index ae73fd2..3ba440a 100755
 | ||||
| --- a/modules.d/99base/init.sh
 | ||||
| +++ b/modules.d/99base/init.sh
 | ||||
| @@ -90,6 +90,7 @@ trap "action_on_fail Signal caught!" 0
 | ||||
|   | ||||
|  [ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs | ||||
|  [ -d /run/log ] || mkdir -p -m 0755 /run/log | ||||
| +[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
 | ||||
|   | ||||
|  export UDEVVERSION=$(udevadm --version) | ||||
|  if [ $UDEVVERSION -gt 166 ]; then | ||||
							
								
								
									
										28
									
								
								0008-resume-fix-swap-detection-in-hostonly.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								0008-resume-fix-swap-detection-in-hostonly.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,28 @@ | ||||
| From cfdec163f9dfd5e083f2c8a728c476381faa8baa Mon Sep 17 00:00:00 2001 | ||||
| From: Alexander Tsoy <alexander@tsoy.me> | ||||
| Date: Wed, 9 Oct 2013 06:39:46 +0400 | ||||
| Subject: [PATCH] resume: fix swap detection in hostonly | ||||
| 
 | ||||
| Check for other possible fs types. This fixes swap detection when using | ||||
| TuxOnIce kernel. | ||||
| 
 | ||||
| Note that parse-resume.sh generate udev rules with support for | ||||
| ID_FS_TYPE=suspend, but we do not include it here, because it is | ||||
| libvolume_id thing and host_fs_types is populated using blkid. | ||||
| ---
 | ||||
|  modules.d/95resume/module-setup.sh | 2 +- | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
 | ||||
| index b6d2c48..8b37616 100755
 | ||||
| --- a/modules.d/95resume/module-setup.sh
 | ||||
| +++ b/modules.d/95resume/module-setup.sh
 | ||||
| @@ -7,7 +7,7 @@ check() {
 | ||||
|      # No point trying to support resume, if no swap partition exist | ||||
|      [[ $hostonly ]] || [[ $mount_needs ]] && { | ||||
|          for fs in "${host_fs_types[@]}"; do | ||||
| -            [[ $fs = swap ]] && return 0
 | ||||
| +            [[ $fs =~ ^(swap|swsuspend|swsupend)$ ]] && return 0
 | ||||
|          done | ||||
|          return 255 | ||||
|      } | ||||
							
								
								
									
										88
									
								
								0009-resume-remove-resume-genrules.sh.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								0009-resume-remove-resume-genrules.sh.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,88 @@ | ||||
| From 1aedbb788696f4ead7fa338edab4b3dcbbe3c8f0 Mon Sep 17 00:00:00 2001 | ||||
| From: Alexander Tsoy <alexander@tsoy.me> | ||||
| Date: Wed, 9 Oct 2013 07:02:56 +0400 | ||||
| Subject: [PATCH] resume: remove resume-genrules.sh | ||||
| 
 | ||||
| parse-resume.sh already contains all the code from resume-genrules.sh. | ||||
| Also parse-resume.sh is executed before resume-genrules.sh, so there is | ||||
| no point to keep the latter. | ||||
| 
 | ||||
| This fixes the following error messages: | ||||
| dracut-initqueue: ln: failed to create symbolic link '/dev/resume': File exists | ||||
| dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/settled/resume.sh': No such file or directory | ||||
| dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/timeout/resume.sh': No such file or directory | ||||
| ---
 | ||||
|  modules.d/95resume/module-setup.sh    |  1 - | ||||
|  modules.d/95resume/resume-genrules.sh | 51 ----------------------------------- | ||||
|  2 files changed, 52 deletions(-) | ||||
|  delete mode 100755 modules.d/95resume/resume-genrules.sh | ||||
| 
 | ||||
| diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
 | ||||
| index 8b37616..a172c27 100755
 | ||||
| --- a/modules.d/95resume/module-setup.sh
 | ||||
| +++ b/modules.d/95resume/module-setup.sh
 | ||||
| @@ -32,7 +32,6 @@ install() {
 | ||||
|          inst_hook cmdline 10 "$moddir/parse-resume.sh" | ||||
|      else | ||||
|          inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh | ||||
| -        inst_hook pre-udev 30 "$moddir/resume-genrules.sh"
 | ||||
|      fi | ||||
|   | ||||
|      inst_script  "$moddir/resume.sh" /lib/dracut/resume.sh | ||||
| diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
 | ||||
| deleted file mode 100755 | ||||
| index c542c71..0000000
 | ||||
| --- a/modules.d/95resume/resume-genrules.sh
 | ||||
| +++ /dev/null
 | ||||
| @@ -1,51 +0,0 @@
 | ||||
| -#!/bin/sh
 | ||||
| -# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 | ||||
| -# ex: ts=8 sw=4 sts=4 et filetype=sh
 | ||||
| -
 | ||||
| -case "$splash" in
 | ||||
| -    quiet )
 | ||||
| -        a_splash="-P splash=y"
 | ||||
| -    ;;
 | ||||
| -    * )
 | ||||
| -        a_splash="-P splash=n"
 | ||||
| -    ;;
 | ||||
| -esac
 | ||||
| -
 | ||||
| -if [ -n "$resume" ]; then
 | ||||
| -    {
 | ||||
| -        printf "KERNEL==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
 | ||||
| -            ${resume#/dev/};
 | ||||
| -        printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
 | ||||
| -            ${resume#/dev/};
 | ||||
| -    } >> /etc/udev/rules.d/99-resume-link.rules
 | ||||
| -
 | ||||
| -    {
 | ||||
| -        if [ -x /usr/sbin/resume ]; then
 | ||||
| -            printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
 | ||||
| -                ${resume#/dev/} "$a_splash" "$resume";
 | ||||
| -            printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
 | ||||
| -                ${resume#/dev/} "$a_splash" "$resume";
 | ||||
| -        fi
 | ||||
| -        printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n" \
 | ||||
| -            ${resume#/dev/};
 | ||||
| -        printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m  > /sys/power/resume\"\n" \
 | ||||
| -            ${resume#/dev/};
 | ||||
| -    } >> /etc/udev/rules.d/99-resume.rules
 | ||||
| -
 | ||||
| -    printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
 | ||||
| -        "$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh
 | ||||
| -
 | ||||
| -    printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \
 | ||||
| -        "$hookdir" >> $hookdir/initqueue/timeout/resume.sh
 | ||||
| -
 | ||||
| -    wait_for_dev "/dev/resume"
 | ||||
| -
 | ||||
| -elif ! getarg noresume; then
 | ||||
| -    {
 | ||||
| -        if [ -x /usr/sbin/resume ]; then
 | ||||
| -            printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \$tempnode\"\n" "$a_splash"
 | ||||
| -        fi
 | ||||
| -        echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \
 | ||||
| -            " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume\"";
 | ||||
| -    } >> /etc/udev/rules.d/99-resume.rules
 | ||||
| -fi
 | ||||
							
								
								
									
										105
									
								
								0010-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								0010-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,105 @@ | ||||
| From 871c8e40d1c7bb1bace48ce19ea1b956f7065458 Mon Sep 17 00:00:00 2001 | ||||
| From: P J P <ppandit@redhat.com> | ||||
| Date: Fri, 11 Oct 2013 19:26:51 +0530 | ||||
| Subject: [PATCH] Add lzo, lz4 compression and read INITRD_COMPRESS | ||||
| 
 | ||||
| This patch adds support for lzop(1) & lz4(1) compression | ||||
| algorithms to compress iniramfs image file. Both are supported | ||||
| by the Linux kernel. | ||||
| 
 | ||||
| Linux kernel exports user's choice of initramfs compression | ||||
| algorithm as a shell environment variable: INITRD_COMPRESS. | ||||
| This patch adds support to read this variable and duly compress | ||||
| the initramfs image file. | ||||
| 
 | ||||
| Environment variable INITRD_COMPRESS has less precedence than the | ||||
| command line options --gzip, etc. Ie. command line options could | ||||
| override the compression algorithm defined by $INITRD_COMPRESS. | ||||
| 
 | ||||
| Signed-off-by: P J P <ppandit@redhat.com> | ||||
| 
 | ||||
| [Edited-by: Harald Hoyer: add documentation about lzo and lz4] | ||||
| ---
 | ||||
|  dracut.8.asc | 16 ++++++++++++++++ | ||||
|  dracut.sh    | 13 +++++++++++++ | ||||
|  2 files changed, 29 insertions(+) | ||||
| 
 | ||||
| diff --git a/dracut.8.asc b/dracut.8.asc
 | ||||
| index 584514c..2ea6744 100644
 | ||||
| --- a/dracut.8.asc
 | ||||
| +++ b/dracut.8.asc
 | ||||
| @@ -365,6 +365,22 @@ Make sure your kernel has xz decompression support compiled in, otherwise you
 | ||||
|  will not be able to boot. Equivalent to "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" | ||||
|  ==== | ||||
|   | ||||
| +**--lzo**::
 | ||||
| +    Compress the generated initramfs using lzop.
 | ||||
| +[WARNING]
 | ||||
| +====
 | ||||
| +Make sure your kernel has lzo decompression support compiled in, otherwise you
 | ||||
| +will not be able to boot.
 | ||||
| +====
 | ||||
| +
 | ||||
| +**--lz4**::
 | ||||
| +    Compress the generated initramfs using lz4.
 | ||||
| +[WARNING]
 | ||||
| +====
 | ||||
| +Make sure your kernel has lz4 decompression support compiled in, otherwise you
 | ||||
| +will not be able to boot.
 | ||||
| +====
 | ||||
| +
 | ||||
|  **--compress** _<compressor>_:: | ||||
|      Compress the generated initramfs using the passed compression program. If | ||||
|      you pass it just the name of a compression program, it will call that | ||||
| diff --git a/dracut.sh b/dracut.sh
 | ||||
| index d9533dd..173a259 100755
 | ||||
| --- a/dracut.sh
 | ||||
| +++ b/dracut.sh
 | ||||
| @@ -165,6 +165,12 @@ Creates initial ramdisk images for preloading modules
 | ||||
|    --xz                  Compress the generated initramfs using xz. | ||||
|                           Make sure that your kernel has xz support compiled | ||||
|                           in, otherwise you will not be able to boot. | ||||
| +  --lzo                  Compress the generated initramfs using lzop.
 | ||||
| +                         Make sure that your kernel has lzo support compiled
 | ||||
| +                         in, otherwise you will not be able to boot.
 | ||||
| +  --lz4                  Compress the generated initramfs using lz4.
 | ||||
| +                         Make sure that your kernel has lz4 support compiled
 | ||||
| +                         in, otherwise you will not be able to boot.
 | ||||
|    --compress [COMPRESSION] Compress the generated initramfs with the | ||||
|                           passed compression program.  Make sure your kernel | ||||
|                           knows how to decompress the generated initramfs, | ||||
| @@ -342,6 +348,8 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \
 | ||||
|      --long bzip2 \ | ||||
|      --long lzma \ | ||||
|      --long xz \ | ||||
| +    --long lzo \
 | ||||
| +    --long lz4 \
 | ||||
|      --long no-compress \ | ||||
|      --long gzip \ | ||||
|      --long list-modules \ | ||||
| @@ -430,6 +438,8 @@ while :; do
 | ||||
|          --bzip2)       compress_l="bzip2";; | ||||
|          --lzma)        compress_l="lzma";; | ||||
|          --xz)          compress_l="xz";; | ||||
| +        --lzo)         compress_l="lzo";;
 | ||||
| +        --lz4)         compress_l="lz4";;
 | ||||
|          --no-compress) _no_compress_l="cat";; | ||||
|          --gzip)        compress_l="gzip";; | ||||
|          --list-modules) do_list="yes";; | ||||
| @@ -673,6 +683,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
 | ||||
|  [[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" | ||||
|  [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" | ||||
|  [[ $tmpdir ]] || tmpdir=/var/tmp | ||||
| +[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
 | ||||
|  [[ $compress_l ]] && compress=$compress_l | ||||
|  [[ $show_modules_l ]] && show_modules=$show_modules_l | ||||
|  [[ $nofscks_l ]] && nofscks="yes" | ||||
| @@ -689,6 +700,8 @@ case $compress in
 | ||||
|      lzma)  compress="lzma -9";; | ||||
|      xz)    compress="xz --check=crc32 --lzma2=dict=1MiB";; | ||||
|      gzip)  compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";; | ||||
| +    lzo)   compress="lzop -9";;
 | ||||
| +    lz4)   compress="lz4 -9";;
 | ||||
|  esac | ||||
|  if [[ $_no_compress_l = "cat" ]]; then | ||||
|      compress="cat" | ||||
							
								
								
									
										37
									
								
								0011-lvm-fix-thin-recognition.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								0011-lvm-fix-thin-recognition.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,37 @@ | ||||
| From aabea6f7b9c057571d1869c6974d4c4f42530e7e Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 16 Oct 2013 11:30:08 +0200 | ||||
| Subject: [PATCH] lvm: fix thin recognition | ||||
| 
 | ||||
| The global var setting was happening in a pipe and did not have an | ||||
| effect. | ||||
| 
 | ||||
| Use <<<$() instead. | ||||
| 
 | ||||
| < <() cannot be used, because dracut is called in chroot's environments,
 | ||||
| where /dev/fd does not point to /proc/self/fd, but bash wants | ||||
| /dev/fd/<num> for this construct. | ||||
| ---
 | ||||
|  modules.d/90lvm/module-setup.sh | 5 +++-- | ||||
|  1 file changed, 3 insertions(+), 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
 | ||||
| index f8b598d..cbdf4a2 100755
 | ||||
| --- a/modules.d/90lvm/module-setup.sh
 | ||||
| +++ b/modules.d/90lvm/module-setup.sh
 | ||||
| @@ -57,12 +57,13 @@ install() {
 | ||||
|      inst lvm | ||||
|   | ||||
|      if [[ $hostonly ]]; then | ||||
| -        get_host_lvs | while read line; do
 | ||||
| +        while read line; do
 | ||||
| +            [[ -n "$line" ]] || continue
 | ||||
|              printf "%s" " rd.lvm.lv=$line" | ||||
|              if ! [[ $_needthin ]]; then | ||||
|                  [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 | ||||
|              fi | ||||
| -        done >> "${initdir}/etc/cmdline.d/90lvm.conf"
 | ||||
| +        done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf"
 | ||||
|          echo >> "${initdir}/etc/cmdline.d/90lvm.conf" | ||||
|      else | ||||
|          _needthin=1 | ||||
							
								
								
									
										22
									
								
								0012-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								0012-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| From 68b736b50fbd6bb952d9499296ec70a218e1f5da Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 16 Oct 2013 11:31:54 +0200 | ||||
| Subject: [PATCH] dracut.sh: also mkdir /run/lock, which is copied to | ||||
| 
 | ||||
| ---
 | ||||
|  dracut.sh | 2 +- | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/dracut.sh b/dracut.sh
 | ||||
| index 173a259..a6e3df3 100755
 | ||||
| --- a/dracut.sh
 | ||||
| +++ b/dracut.sh
 | ||||
| @@ -1094,7 +1094,7 @@ if [[ $kernel_only != yes ]]; then
 | ||||
|          fi | ||||
|      done | ||||
|   | ||||
| -    for d in dev proc sys sysroot root run run/lock run/initramfs; do
 | ||||
| +    for d in dev proc sys sysroot root run run/log run/lock run/initramfs; do
 | ||||
|          if [ -L "/$d" ]; then | ||||
|              inst_symlink "/$d" | ||||
|          else | ||||
							
								
								
									
										22
									
								
								0013-dracut.sh-no-need-to-make-subdirs-in-run.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								0013-dracut.sh-no-need-to-make-subdirs-in-run.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| From 8d89fc6bb1b5b1f4c8be0694a1e1200a09ae07d1 Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 16 Oct 2013 11:39:17 +0200 | ||||
| Subject: [PATCH] dracut.sh: no need to make subdirs in run | ||||
| 
 | ||||
| ---
 | ||||
|  dracut.sh | 2 +- | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/dracut.sh b/dracut.sh
 | ||||
| index a6e3df3..4613d5b 100755
 | ||||
| --- a/dracut.sh
 | ||||
| +++ b/dracut.sh
 | ||||
| @@ -1094,7 +1094,7 @@ if [[ $kernel_only != yes ]]; then
 | ||||
|          fi | ||||
|      done | ||||
|   | ||||
| -    for d in dev proc sys sysroot root run run/log run/lock run/initramfs; do
 | ||||
| +    for d in dev proc sys sysroot root run; do
 | ||||
|          if [ -L "/$d" ]; then | ||||
|              inst_symlink "/$d" | ||||
|          else | ||||
| @ -0,0 +1,36 @@ | ||||
| From 879546753341a9b2b1ad391a14ebe9fd3f6c27c4 Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 16 Oct 2013 11:39:34 +0200 | ||||
| Subject: [PATCH] network/fcoe: only redirect output to loginit.pipe, if exists | ||||
| 
 | ||||
| ---
 | ||||
|  modules.d/40network/dhclient-script.sh | 2 +- | ||||
|  modules.d/95fcoe/fcoe-up.sh            | 2 +- | ||||
|  2 files changed, 2 insertions(+), 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
 | ||||
| index 07c3d9b..af483ac 100755
 | ||||
| --- a/modules.d/40network/dhclient-script.sh
 | ||||
| +++ b/modules.d/40network/dhclient-script.sh
 | ||||
| @@ -48,7 +48,7 @@ setup_interface() {
 | ||||
|  PATH=/usr/sbin:/usr/bin:/sbin:/bin | ||||
|   | ||||
|  export PS4="dhclient.$interface.$$ + " | ||||
| -exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 | ||||
| +[ -e /run/initramfs/loginit.pipe ] && exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 | ||||
|  type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh | ||||
|  type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh | ||||
|   | ||||
| diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
 | ||||
| index ecb1593..8cf39ec 100755
 | ||||
| --- a/modules.d/95fcoe/fcoe-up.sh
 | ||||
| +++ b/modules.d/95fcoe/fcoe-up.sh
 | ||||
| @@ -14,7 +14,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin
 | ||||
|  [ -z "$1" -o -z "$2" ] && exit 1 | ||||
|   | ||||
|  export PS4="fcoe-up.$1.$$ + " | ||||
| -exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 | ||||
| +[ -e /run/initramfs/loginit.pipe ] && exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 | ||||
|  type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh | ||||
|  type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh | ||||
|   | ||||
							
								
								
									
										83
									
								
								0015-mkdir-basic-dirs-in-run.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								0015-mkdir-basic-dirs-in-run.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,83 @@ | ||||
| From 56903458d7e67f805a7e484cd025a059a5621d73 Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Wed, 16 Oct 2013 11:47:01 +0200 | ||||
| Subject: [PATCH] mkdir basic dirs in /run | ||||
| 
 | ||||
| for systemd initramfs, /run is also mounted | ||||
| for non-systemd the contents of /run is copied over, when mounting /run | ||||
| ---
 | ||||
|  modules.d/98systemd/dracut-cmdline.sh |  5 ----- | ||||
|  modules.d/99base/dracut-lib.sh        |  7 +++++++ | ||||
|  modules.d/99base/init.sh              | 10 +++------- | ||||
|  3 files changed, 10 insertions(+), 12 deletions(-) | ||||
| 
 | ||||
| diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh
 | ||||
| index 50b8d6c..aa8a02b 100755
 | ||||
| --- a/modules.d/98systemd/dracut-cmdline.sh
 | ||||
| +++ b/modules.d/98systemd/dracut-cmdline.sh
 | ||||
| @@ -2,11 +2,6 @@
 | ||||
|  # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- | ||||
|  # ex: ts=8 sw=4 sts=4 et filetype=sh | ||||
|   | ||||
| -[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
 | ||||
| -[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
 | ||||
| -[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
 | ||||
| -[ -d /run/log ] || mkdir -p -m 0755 /run/log
 | ||||
| -
 | ||||
|  if [ -f /dracut-state.sh ]; then | ||||
|      . /dracut-state.sh 2>/dev/null | ||||
|  fi | ||||
| diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
 | ||||
| index 74d7d35..0670cf2 100755
 | ||||
| --- a/modules.d/99base/dracut-lib.sh
 | ||||
| +++ b/modules.d/99base/dracut-lib.sh
 | ||||
| @@ -4,6 +4,13 @@
 | ||||
|   | ||||
|  export DRACUT_SYSTEMD | ||||
|  export NEWROOT | ||||
| +if [ -n "$NEWROOT" ]; then
 | ||||
| +    [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
 | ||||
| +fi
 | ||||
| +
 | ||||
| +[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
 | ||||
| +[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
 | ||||
| +[ -d /run/log ] || mkdir -p -m 0755 /run/log
 | ||||
|   | ||||
|  debug_off() { | ||||
|      set +x | ||||
| diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
 | ||||
| index 3ba440a..2364f4f 100755
 | ||||
| --- a/modules.d/99base/init.sh
 | ||||
| +++ b/modules.d/99base/init.sh
 | ||||
| @@ -56,17 +56,17 @@ fi
 | ||||
|   | ||||
|  if ! ismounted /dev/pts; then | ||||
|      mkdir -m 0755 /dev/pts | ||||
| -    mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null 
 | ||||
| +    mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null
 | ||||
|  fi | ||||
|   | ||||
|  if ! ismounted /dev/shm; then | ||||
|      mkdir -m 0755 /dev/shm | ||||
| -    mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null 
 | ||||
| +    mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
 | ||||
|  fi | ||||
|   | ||||
|  if ! ismounted /run; then | ||||
|      mkdir -m 0755 /newrun | ||||
| -    mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null 
 | ||||
| +    mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
 | ||||
|      cp -a /run/* /newrun >/dev/null 2>&1 | ||||
|      mount --move /newrun /run | ||||
|      rm -fr -- /newrun | ||||
| @@ -88,10 +88,6 @@ fi
 | ||||
|   | ||||
|  trap "action_on_fail Signal caught!" 0 | ||||
|   | ||||
| -[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
 | ||||
| -[ -d /run/log ] || mkdir -p -m 0755 /run/log
 | ||||
| -[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
 | ||||
| -
 | ||||
|  export UDEVVERSION=$(udevadm --version) | ||||
|  if [ $UDEVVERSION -gt 166 ]; then | ||||
|      # newer versions of udev use /run/udev/rules.d | ||||
| @ -0,0 +1,50 @@ | ||||
| From 96c6f6f3d101a16b70d0fe760abbf8ea77975bc4 Mon Sep 17 00:00:00 2001 | ||||
| From: Marian Csontos <mcsontos@redhat.com> | ||||
| Date: Fri, 18 Oct 2013 14:40:40 +0200 | ||||
| Subject: [PATCH] dracut-functions.sh:check_block_and_slaves*() skip LVM | ||||
|  internal devs | ||||
| 
 | ||||
| Not every device in /dev/mapper should be examined. | ||||
| If it is an LVM device, touch only devices which have /dev/VG/LV symlink. | ||||
| ---
 | ||||
|  dracut-functions.sh | 16 ++++++++++++++-- | ||||
|  1 file changed, 14 insertions(+), 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/dracut-functions.sh b/dracut-functions.sh
 | ||||
| index 45e0911..2e6e845 100755
 | ||||
| --- a/dracut-functions.sh
 | ||||
| +++ b/dracut-functions.sh
 | ||||
| @@ -579,7 +579,7 @@ host_fs_all()
 | ||||
|  check_block_and_slaves() { | ||||
|      local _x | ||||
|      [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. | ||||
| -    "$1" $2 && return
 | ||||
| +    if ! lvm_internal_dev $2; then "$1" $2 && return; fi
 | ||||
|      check_vol_slaves "$@" && return 0 | ||||
|      if [[ -f /sys/dev/block/$2/../dev ]]; then | ||||
|          check_block_and_slaves $1 $(<"/sys/dev/block/$2/../dev") && return 0 | ||||
| @@ -595,7 +595,7 @@ check_block_and_slaves() {
 | ||||
|  check_block_and_slaves_all() { | ||||
|      local _x _ret=1 | ||||
|      [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. | ||||
| -    if "$1" $2; then
 | ||||
| +    if ! lvm_internal_dev $2 && "$1" $2; then
 | ||||
|          _ret=0 | ||||
|      fi | ||||
|      check_vol_slaves "$@" && return 0 | ||||
| @@ -1672,3 +1672,15 @@ get_ucode_file ()
 | ||||
|          printf "%02x-%02x-%02x" ${family} ${model} ${stepping} | ||||
|      fi | ||||
|  } | ||||
| +
 | ||||
| +# Not every device in /dev/mapper should be examined.
 | ||||
| +# If it is an LVM device, touch only devices which have /dev/VG/LV symlink.
 | ||||
| +lvm_internal_dev() {
 | ||||
| +    local dev_dm_dir=/sys/dev/block/$1/dm
 | ||||
| +    [[ ! -f $dev_dm_dir/uuid || $(<$dev_dm_dir/uuid) != LVM-* ]] && return 1 # Not an LVM device
 | ||||
| +    local DM_VG_NAME DM_LV_NAME DM_LV_LAYER
 | ||||
| +    eval $(dmsetup splitname --nameprefixes --noheadings --rows "$(<$dev_dm_dir/name)" 2>/dev/null)
 | ||||
| +    [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 0 # Better skip this!
 | ||||
| +    [[ ${DM_LV_LAYER} ]] || [[ ! -L /dev/${DM_VG_NAME}/${DM_LV_NAME} ]]
 | ||||
| +}
 | ||||
| +
 | ||||
| @ -1,8 +1,15 @@ | ||||
| From 0000000000000deadbeef0000000000000000000 Mon Sep 17 00:00:00 2001 | ||||
| From: Kyle McMartin <kyle@redhat.com> | ||||
| Date: Fri, 11 Oct 2013 17:47:24 -0400 | ||||
| Subject: [PATCH] add mmc_block and usb_storage on ARM | ||||
| From 76a44782647c2693039d15a2d8073d70be9b6756 Mon Sep 17 00:00:00 2001 | ||||
| From: Harald Hoyer <harald@redhat.com> | ||||
| Date: Fri, 18 Oct 2013 14:56:51 +0200 | ||||
| Subject: [PATCH] kernel-modules(ARM): add mmc_block usb_storage to statis list | ||||
|  of kernel mods | ||||
| 
 | ||||
| ---
 | ||||
|  modules.d/90kernel-modules/module-setup.sh | 2 +- | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
 | ||||
| index f6d1c3d..2100336 100755
 | ||||
| --- a/modules.d/90kernel-modules/module-setup.sh
 | ||||
| +++ b/modules.d/90kernel-modules/module-setup.sh
 | ||||
| @@ -49,7 +49,7 @@ installkernel() {
 | ||||
							
								
								
									
										19
									
								
								dracut.spec
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								dracut.spec
									
									
									
									
									
								
							| @ -10,7 +10,7 @@ | ||||
| 
 | ||||
| Name: dracut | ||||
| Version: 034 | ||||
| Release: 8.git20131008%{?dist} | ||||
| Release: 18.git20131018%{?dist} | ||||
| 
 | ||||
| Summary: Initramfs generator using udev | ||||
| %if 0%{?fedora} || 0%{?rhel} | ||||
| @ -35,7 +35,17 @@ Patch3: 0003-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch | ||||
| Patch4: 0004-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch | ||||
| Patch5: 0005-Doc-cleanup-extend-and-split-and-reuse.patch | ||||
| Patch6: 0006-dmsquash-live-add-dev-mapper-live-base.patch | ||||
| Patch7: 0007-arm-add-more-modules-for-hostonly.patch | ||||
| Patch7: 0007-base-init.sh-also-mkdir-run-lock.patch | ||||
| Patch8: 0008-resume-fix-swap-detection-in-hostonly.patch | ||||
| Patch9: 0009-resume-remove-resume-genrules.sh.patch | ||||
| Patch10: 0010-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch | ||||
| Patch11: 0011-lvm-fix-thin-recognition.patch | ||||
| Patch12: 0012-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch | ||||
| Patch13: 0013-dracut.sh-no-need-to-make-subdirs-in-run.patch | ||||
| Patch14: 0014-network-fcoe-only-redirect-output-to-loginit.pipe-if.patch | ||||
| Patch15: 0015-mkdir-basic-dirs-in-run.patch | ||||
| Patch16: 0016-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch | ||||
| Patch17: 0017-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch | ||||
| 
 | ||||
| 
 | ||||
| BuildRequires: bash git | ||||
| @ -456,6 +466,11 @@ rm -rf -- $RPM_BUILD_ROOT | ||||
| %endif | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Oct 18 2013 Harald Hoyer <harald@redhat.com> 034-18.git20131018 | ||||
| - Fixed LVM with thin provisioning | ||||
| Resolves: rhbz#1013767 | ||||
| - fixed swap detection in host only mode | ||||
| 
 | ||||
| * Fri Oct 11 2013 Kyle McMartin <kyle@fedoraproject.org> 034-8.git20131008 | ||||
| - Force mmc_block and usb_storage into ARM initramfs. | ||||
| Resolves: rhbz#1015234 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user