Use existing bash instance when running destroyScript

The destroy script already has a bash interpreter in use, but when the
`disk-deactivate` script is ran, it calls out to /usr/bin/env to query
for a bash interpreter. When running the destroyScript in unique places
(such as the stage-1 initrd), /usr/bin/env might not exist, so we can
make destroyScript more self-contained by reusing the same bash.
This commit is contained in:
Jared Baur 2024-04-05 15:15:38 -07:00 committed by mergify[bot]
parent a297cb1cb0
commit 8d4ae698ea

View file

@ -449,7 +449,7 @@ let
# shellcheck disable=SC2043
for dev in ${toString (lib.catAttrs "device" (lib.attrValues devices.disk))}; do
${../disk-deactivate}/disk-deactivate "$dev"
$BASH ${../disk-deactivate}/disk-deactivate "$dev"
done
'';
};