[make-initrd] [PATCH v1 13/41] fork pipeline: rootfs step modified

Leonid Krivoshein klark.devel at gmail.com
Fri Sep 24 18:56:48 MSK 2021


---
  .../bootchain-core/data/lib/bootchain/rootfs        | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/make-initrd/features/bootchain-core/data/lib/bootchain/rootfs 
b/make-initrd/features/bootchain-core/data/lib/bootchain/rootfs
index e4b2ca9..1801a81 100755
--- a/make-initrd/features/bootchain-core/data/lib/bootchain/rootfs
+++ b/make-initrd/features/bootchain-core/data/lib/bootchain/rootfs
@@ -1,10 +1,11 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
  -[ -n "$prevdir" ] ||
-	fatal "no previous step to use as rootfs"
-
-run mount --move "$prevdir" "$rootmnt"
+launch_step_once
+[ -n "$prevdir" ] && mountpoint -q -- "$prevdir" ||
+	fatal "no previous step results to use as rootfs"
+[ "$prevdir" = "$rootmnt" ] ||
+	run mount --move -- "$prevdir" "$rootmnt"
  echo localdev > /etc/initrd/method
-exit 2
+break_bc_loop
-- 
2.21.0




More information about the Make-initrd mailing list