mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 05:53:28 +01:00
Fix _destroy
This commit is contained in:
1 parent
cbc1f418d0
commit
69265ccde5
1 file changed
+4
-11
+4
-11
@@ -877,9 +877,7 @@ let
|
|||||||
# shellcheck disable=SC2043,2041
|
# shellcheck disable=SC2043,2041
|
||||||
for dev in ${
|
for dev in ${
|
||||||
toString (
|
toString (
|
||||||
lib.catAttrs "device" (
|
lib.catAttrs "device" (lib.attrValues (lib.filterAttrs (name: disk: disk.destroy) devices.disk))
|
||||||
lib.attrValues (lib.filterAttrs (name: disk: (disk.destroy or true)) devices.disk)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
do
|
do
|
||||||
@@ -896,9 +894,8 @@ let
|
|||||||
'';
|
'';
|
||||||
default =
|
default =
|
||||||
let
|
let
|
||||||
selectedDisks = lib.escapeShellArgs (
|
disksToWipe = lib.attrValues (lib.filterAttrs (name: disk: disk.destroy) devices.disk);
|
||||||
lib.catAttrs "device" (lib.filterAttrs (name: disk: (disk.destroy or true)) devices.disk)
|
selectedDisks = lib.escapeShellArgs (lib.catAttrs "device" disksToWipe);
|
||||||
);
|
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
if [ "$1" != "--yes-wipe-all-disks" ]; then
|
if [ "$1" != "--yes-wipe-all-disks" ]; then
|
||||||
@@ -923,11 +920,7 @@ let
|
|||||||
umount -Rv "${rootMountPoint}" || :
|
umount -Rv "${rootMountPoint}" || :
|
||||||
|
|
||||||
# shellcheck disable=SC2043,2041
|
# shellcheck disable=SC2043,2041
|
||||||
for dev in ${
|
for dev in ${toString (lib.catAttrs "device" disksToWipe)}; do
|
||||||
toString (
|
|
||||||
lib.catAttrs "device" (lib.filterAttrs (name: disk: (disk.destroy or true)) devices.disk)
|
|
||||||
)
|
|
||||||
}; do
|
|
||||||
$BASH ${../disk-deactivate}/disk-deactivate "$dev"
|
$BASH ${../disk-deactivate}/disk-deactivate "$dev"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in new issue
Block a user