diff options
author | Klemens Nanni <klemens@posteo.de> | 2022-05-03 15:57:30 +0200 |
---|---|---|
committer | Klemens Nanni <klemens@posteo.de> | 2022-05-03 16:28:39 +0200 |
commit | d1754b1ab08027265ff7dec1148eebcc6e128080 (patch) | |
tree | 588b451e13b00f0ab464f4bb9de4939b599c965a /nixos/modules/tasks/filesystems | |
parent | 2a341bd2f4c202781c118b46c6ecde75a2935e7e (diff) | |
download | nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar.gz nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar.bz2 nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar.lz nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar.xz nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.tar.zst nixlib-d1754b1ab08027265ff7dec1148eebcc6e128080.zip |
nixos/filesystems/zfs: Use proper script mode
Tell zpool-list(8) to format output rather than modifying it afterwards. Furthermore, pool names may contain spaces and would thus break due to awk(1)'s word splitting.
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 08f7fc1eba32..f29c2afa4b26 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -666,7 +666,7 @@ in # expand every pool. Otherwise we want to enumerate # just the specifically provided list of pools. poolListProvider = if cfgExpandOnBoot == "all" - then "$(zpool list -H | awk '{print $1}')" + then "$(zpool list -H -o name)" else lib.escapeShellArgs cfgExpandOnBoot; in { |