Skip to content

Commit c1ba81b

Browse files
authored
Merge pull request #21 from cgwalters/fix-losetup-template
disk: Actually use losetup wrapper
2 parents 3059262 + 072a497 commit c1ba81b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/bootc/bootc_disk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ const imageMetaXattr = "user.bootc.meta"
3838
// tempLosetupWrapperContents is a workaround for https://github.com/containers/bootc/pull/487/commits/89d34c7dbcb8a1fa161f812c6ba0a8b49ccbe00f
3939
const tempLosetupWrapperContents = `#!/bin/bash
4040
set -euo pipefail
41-
args=()
41+
args=(/usr/sbin/losetup --direct-io=off)
4242
for arg in "$@"; do
4343
case $arg in
4444
--direct-io=*) echo "ignoring: $arg" 1>&2;;
45-
*) args+="$arg" ;;
45+
*) args+=("$arg") ;;
4646
esac
4747
done
48-
exec /usr/sbin/losetup "$@" --direct-io=off
48+
exec "${args[@]}"
4949
`
5050

5151
// DiskImageConfig defines configuration for the

0 commit comments

Comments
 (0)