fix: fde-lock shellcheck SC2016 on guest scripts
This commit is contained in:
1 parent
487bb678ef
commit
b5ef82a0fe
1 file changed
+2
@@ -133,6 +133,7 @@ store_mounts() {
|
|||||||
|
|
||||||
# guest_mount INST VOL: where the guest mounted a block volume (by-id path from the Incus device name).
|
# guest_mount INST VOL: where the guest mounted a block volume (by-id path from the Incus device name).
|
||||||
guest_mount() {
|
guest_mount() {
|
||||||
|
# shellcheck disable=SC2016 # $1 expands in the guest shell
|
||||||
timeout --kill-after=3 10 incus exec -T "$1" --env "PATH=$gpath" -- sh -c \
|
timeout --kill-after=3 10 incus exec -T "$1" --env "PATH=$gpath" -- sh -c \
|
||||||
'd="$(realpath -e "$1")" && findmnt -rn -o TARGET -S "$d"' sh \
|
'd="$(realpath -e "$1")" && findmnt -rn -o TARGET -S "$d"' sh \
|
||||||
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_$2-part1" < /dev/null 2> /dev/null | head -n1
|
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_$2-part1" < /dev/null 2> /dev/null | head -n1
|
||||||
@@ -142,6 +143,7 @@ guest_mount() {
|
|||||||
guest_containers() {
|
guest_containers() {
|
||||||
local inst="$1"
|
local inst="$1"
|
||||||
shift
|
shift
|
||||||
|
# shellcheck disable=SC2016 # $@, $s, $n expand in the guest shell
|
||||||
timeout --kill-after=3 10 incus exec -T "$inst" --env "PATH=$gpath" -- sh -c '
|
timeout --kill-after=3 10 incus exec -T "$inst" --env "PATH=$gpath" -- sh -c '
|
||||||
docker ps -q | xargs -r docker inspect -f "{{.Name}}{{range .Mounts}} {{.Source}}{{end}}" |
|
docker ps -q | xargs -r docker inspect -f "{{.Name}}{{range .Mounts}} {{.Source}}{{end}}" |
|
||||||
while read -r n srcs; do
|
while read -r n srcs; do
|
||||||
|
|||||||
Reference in new issue
Block a user