[make-initrd] [PATCH v1 29/41] fork pipeline: bootchain-sh-functions: resolve_target modified
Leonid Krivoshein
klark.devel at gmail.com
Fri Sep 24 18:58:28 MSK 2021
---
.../data/bin/bootchain-sh-functions | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git
a/make-initrd/features/bootchain-core/data/bin/bootchain-sh-functions
b/make-initrd/features/bootchain-core/data/bin/bootchain-sh-functions
index 6a20c4c..35cee1e 100644
--- a/make-initrd/features/bootchain-core/data/bin/bootchain-sh-functions
+++ b/make-initrd/features/bootchain-core/data/bin/bootchain-sh-functions
@@ -24,20 +24,29 @@ get_parameter()
resolve_target()
{
local target="$1"
+
case "${target%%/*}" in
'')
;;
pipe[0-9]|pipe[0-9][0-9]|pipe[0-9][0-9][0-9])
+ target="$mntdir/dst/step${target:4}"
+ ;;
+ step[0-9]|step[0-9][0-9]|step[0-9][0-9][0-9])
target="$mntdir/dst/$target"
;;
*)
if [ -z "${prevdir-}" ]; then
- message "no previous stop to use"
- return
+ message "no previous step results to use with $PROG"
+ return 0
+ fi
+ if [ "$target" = DEVNAME ] && [ -s "$prevdir/DEVNAME" ]; then
+ read -r target <"$prevdir/DEVNAME" ||:
+ else
+ target="$prevdir/${target#/}"
fi
- target="$prevdir/${target#/}"
;;
esac
+
printf '%s' "$target"
}
-- 2.21.0
More information about the Make-initrd
mailing list