mirror of
https://github.com/nix-community/disko.git
synced 2024-09-11 06:25:33 +03:00
disk-deactivate: execute directly instead of echoing script
This commit is contained in:
parent
fc6f863fe1
commit
7036bb8b30
@ -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
|
||||
|
@ -439,7 +439,7 @@ let
|
||||
|
||||
# shellcheck disable=SC2043
|
||||
for dev in ${toString (lib.catAttrs "device" (lib.attrValues devices.disk))}; do
|
||||
${../disk-deactivate}/disk-deactivate "$dev" | bash -x
|
||||
${../disk-deactivate}/disk-deactivate "$dev"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user