From 30d6e4c6a8ed92b9149730a32be1d9e464c5c51d Mon Sep 17 00:00:00 2001
From: OSAK Buildhauer <osak@fsmpi.rwth-aachen.de>
Date: Tue, 5 Sep 2017 15:01:42 +0000
Subject: [PATCH] casper-patch an aktuelle Version angepasst

---
 patches/initrd/unionstackmount1310.patch | 36 +++++-------------------
 1 file changed, 7 insertions(+), 29 deletions(-)

diff --git a/patches/initrd/unionstackmount1310.patch b/patches/initrd/unionstackmount1310.patch
index 593d561..4dbd7fe 100644
--- a/patches/initrd/unionstackmount1310.patch
+++ b/patches/initrd/unionstackmount1310.patch
@@ -1,5 +1,5 @@
---- a/scripts/casper	2014-03-13 20:35:34.293226677 +0100
-+++ b/scripts/casper	2014-03-13 20:28:39.978460056 +0100
+--- a/scripts/casper	2017-09-05 12:27:21.520000003 +0000
++++ b/scripts/casper	2017-09-05 13:18:53.853333333 +0000
 @@ -43,6 +43,8 @@
                  export PERSISTENT_PATH="${x#persistent-path=}" ;;
              union=*)
@@ -23,33 +23,11 @@
              if [ -d "${image}" ]; then
                  # it is a plain directory: do nothing
                  rofsstring="${image}=${roopt}:${rofsstring}"
-@@ -519,26 +528,18 @@
-             mount -t ${UNIONFS} -o noatime,dirs=/cow/upper=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed"
-             ;;
-         overlay|overlayfs)
--            # Mount the layers pairwise from the bottom onto rootmnt,
--            # for the second and later layers rootmnt forms the lower layer.
-             mounts=""
--            for mount in /cow $rofslist
-+            for mount in $rofslist
-             do
--                mounts="$mount $mounts"
--            done
--            lower=""
--            for mount in $mounts
--            do
--                if [ "$lower" = "" ]; then
--                    lower="$mount"
--                    continue
--                fi
--                mount -t ${UNIONFS} -o "upperdir=$mount/upper,lowerdir=$lower,workdir=$mount/work" \
--                    "$mount" "$rootmnt" || \
--                  mount -t ${UNIONFS} -o "upperdir=$mount/upper,lowerdir=$lower" \
--                      "$mount" "$rootmnt"
--                lower="$rootmnt"
-+                mounts="${mount}:${mounts}"
+@@ -525,7 +534,12 @@
+                 mounts="$mounts:$mount"
              done
-+            mounts="${mounts%:}"
+             mounts="${mounts#:}"
+-            mount -t ${UNIONFS} -o "upperdir=/cow/upper,lowerdir=$mounts,workdir=/cow/work" "/cow" "$rootmnt" || panic "${UNIONFS} mount failed"
 +            overlay_mount_dir=/overlay
 +            mkdir -p "${overlay_mount_dir}"
 +            mount -t ${UNIONFS} -o "lowerdir=${mounts}" root "${overlay_mount_dir}"
@@ -59,7 +37,7 @@
              ;;
      esac
  
-@@ -579,15 +580,17 @@
+@@ -566,15 +580,17 @@
      fi
  
      # move the first mount; no head in busybox-initramfs
-- 
GitLab