Skip to content

Commit 7dbf515

Browse files
committed
05-rosetta-volume.sh: fix unregister rosetta
It executed /proc/sys/fs/binfmt_misc/rosetta unexpectedly. ```log [ 3.223507] cloud-init[763]: + /proc/sys/fs/binfmt_misc/rosetta [ 3.223579] cloud-init[763]: /mnt/lima-cidata/boot/05-rosetta-volume.sh: line 30: /proc/sys/fs/binfmt_misc/rosetta: Permission denied ``` Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent 6aceec3 commit 7dbf515

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/05-rosetta-volume.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ "$LIMA_CIDATA_ROSETTA_BINFMT" = "true" ]; then
2727
[ ! -d "$(dirname "$binfmtd_conf")" ] || [ -f "$binfmtd_conf" ] || echo "$rosetta_binfmt" >"$binfmtd_conf"
2828
else
2929
# unregister rosetta from binfmt_misc if it exists
30-
[ ! -f "$binfmt_entry" ] || echo -1 | "$binfmt_entry"
30+
[ ! -f "$binfmt_entry" ] || echo -1 >"$binfmt_entry"
3131
# remove binfmt.d(5) configuration if it exists
3232
[ ! -f "$binfmtd_conf" ] || rm "$binfmtd_conf"
3333
fi

pkg/driver/vz/boot/05-rosetta-volume.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ "$LIMA_CIDATA_ROSETTA_BINFMT" = "true" ]; then
2727
[ ! -d "$(dirname "$binfmtd_conf")" ] || [ -f "$binfmtd_conf" ] || echo "$rosetta_binfmt" >"$binfmtd_conf"
2828
else
2929
# unregister rosetta from binfmt_misc if it exists
30-
[ ! -f "$binfmt_entry" ] || echo -1 | "$binfmt_entry"
30+
[ ! -f "$binfmt_entry" ] || echo -1 >"$binfmt_entry"
3131
# remove binfmt.d(5) configuration if it exists
3232
[ ! -f "$binfmtd_conf" ] || rm "$binfmtd_conf"
3333
fi

0 commit comments

Comments
 (0)