Patch6: prelink-libs.patch
Patch7: config.patch
Patch8: xz_compressor.patch
-Patch9: misc_fixes.patch
+Patch9: proc_sys_remount.patch
+Patch10: misc_fixes.patch
Patch100: git.patch
URL: https://dracut.wiki.kernel.org/
BuildRequires: asciidoc
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
%patch100 -p1
%{__sed} -i -e 's,@lib@,%{_lib},g' modules.d/50plymouth/module-setup.sh
--- /dev/null
+diff -urN dracut-037.orig/modules.d/99base/init.sh dracut-037/modules.d/99base/init.sh
+--- dracut-037.orig/modules.d/99base/init.sh 2014-03-19 16:16:08.000000000 +0000
++++ dracut-037/modules.d/99base/init.sh 2014-05-17 15:55:22.273000000 +0000
+@@ -258,6 +258,26 @@
+ source_hook cleanup
+
+ # By the time we get here, the root filesystem should be mounted.
++
++# Remount /proc and /sys with options from $NEWROOT/etc/fstab,
++# keep defaults just in case.
++procopts="nosuid,noexec,nodev,"
++sysopts="nosuid,noexec,nodev,"
++if [ -f "$NEWROOT/etc/fstab" ] \
++ && ! [ -L "$NEWROOT/etc/fstab" ]; then
++ while read dev mp fs opts dump fsck; do
++ # skip comments
++ [ "${dev%%#*}" != "$dev" ] && continue
++ if [ "$mp" = "/proc" ]; then
++ procopts=$opts
++ elif [ "$mp" = "/sys" ]; then
++ sysopts=$opts
++ fi
++ done < "$NEWROOT/etc/fstab"
++fi
++mount -o remount,$procopts /proc 2>&1
++mount -o remount,$sysopts /sys 2>&1
++
+ # Try to find init.
+ for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do
+ [ -n "$i" ] || continue