[make-initrd] [PATCH v1 12/41] fork pipeline: overlayfs step modified
Leonid Krivoshein
klark.devel at gmail.com
Fri Sep 24 18:56:41 MSK 2021
---
.../data/lib/bootchain/overlayfs | 21 ++++++++++---------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git
a/make-initrd/features/bootchain-core/data/lib/bootchain/overlayfs
b/make-initrd/features/bootchain-core/data/lib/bootchain/overlayfs
index 23b869b..48f9b7c 100755
--- a/make-initrd/features/bootchain-core/data/lib/bootchain/overlayfs
+++ b/make-initrd/features/bootchain-core/data/lib/bootchain/overlayfs
@@ -1,26 +1,27 @@
#!/bin/bash -efu
-. pipeline-sh-functions
+. bootchain-sh-functions
target="$(get_parameter OVERLAYFS)"
[ -n "$target" ] || [ -n "$prevdir" ] ||
- fatal "no previous step to use as lower directory"
+ fatal "no previous step results to use as lower directory"
-pipe="${target:-$prevdir}"
+chain="${target:-$prevdir}"
lowerdirs=
-while [ -n "$pipe" ]; do
- name="${pipe%%,*}"
+while [ -n "$chain" ]; do
+ name="${chain%%,*}"
dir="$(resolve_target "$name")"
lowerdirs="${lowerdirs:+$lowerdirs,}$dir"
- pipe="${pipe#$name}"
- pipe="${pipe#,}"
+ chain="${chain#$name}"
+ chain="${chain#,}"
done
-mkdir -p -- "$datadir/rw" "$datadir/work"
+run mkdir -p -- "$datadir/rw" "$datadir/work"
-run mount -o
"lowerdir=$lowerdirs,upperdir=$datadir/rw,workdir=$datadir/work" \
- -t overlay overlay "$destdir"
+opts="lowerdir=$lowerdirs,upperdir=$datadir/rw,workdir=$datadir/work"
+
+run mount -t overlay -o "$opts" -- overlay "$destdir"
--
2.21.0
More information about the Make-initrd
mailing list