disko/disk-deactivate/disk-deactivate
Jared Baur 0a17298c0d Add missing dependency gnused
gnused is used in the disk-deactivate.jq script, but was not defined in
the list of dependencies.
2024-04-05 22:34:38 +00:00

8 lines
271 B
Bash
Executable file

#!/usr/bin/env bash
set -efux -o pipefail
# dependencies: bash jq util-linux lvm2 mdadm zfs gnugrep sed
disk=$(realpath "$1")
lsblk -a -f >&2
lsblk --output-all --json | jq -r --arg disk_to_clear "$disk" -f "$(dirname "$0")/disk-deactivate.jq" | bash -x
lsblk -a -f >&2