disk-deactivate: execute directly instead of echoing script

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-09-12 08:41:56 +00:00
1 parent fc6f863fe1
commit 7036bb8b30
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/sh
set -efux
# dependencies: jq util-linux lvm2 mdadm zfs
# dependencies: bash jq util-linux lvm2 mdadm zfs
disk=$(realpath "$1")
lsblk -a -f >/dev/stderr
lsblk --output-all --json | jq -r --arg disk_to_clear "$disk" -f "$(dirname "$0")/disk-deactivate.jq"
lsblk --output-all --json | jq -r --arg disk_to_clear "$disk" -f "$(dirname "$0")/disk-deactivate.jq" | bash -x
lsblk -a -f >/dev/stderr