Skip to content

Commit

Permalink
pipeline/mountfs: Allow to set custom mount options
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Gladkov <[email protected]>
  • Loading branch information
legionus committed May 15, 2024
1 parent 35e1ab6 commit fa0d94d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion features/pipeline/data/lib/pipeline/mountfs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ target="$(resolve_target "$param")"
fatal "unable to resolve: $param"

opts=
if [ -z "${target##*,*}" ]; then
opts="${target#*,}"
target="${target%%,*}"

[ -n "$target" ] ||
fatal "unable to parse MOUNTFS param"
fi

if [ ! -c "$target" ] && [ ! -b "$target" ]; then
modprobe -q 'devname:loop-control' ||:
opts='ro,loop'
opts="${opts:+$opts,}ro,loop"
fi

run mount ${opts:+-o $opts} "$target" "$destdir"

0 comments on commit fa0d94d

Please sign in to comment.