X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=proc_sys_remount.patch;fp=proc_sys_remount.patch;h=496f20b7858dfce3afbd23aaaa89c13f2463c7bc;hb=a3e8f18d60faf237a3aec320658b535c4bc41c7b;hp=0000000000000000000000000000000000000000;hpb=b8802c386fe71a8c68408b29dce85e7be9f08d3e;p=packages%2Fdracut.git diff --git a/proc_sys_remount.patch b/proc_sys_remount.patch new file mode 100644 index 0000000..496f20b --- /dev/null +++ b/proc_sys_remount.patch @@ -0,0 +1,30 @@ +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