diff options
author | Soispha <soispha@vhack.eu> | 2023-07-11 12:54:00 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-11 12:54:00 +0200 |
commit | 81136ec3686d917b714429d58e1df47cb0e6f575 (patch) | |
tree | d92f498c578bba9908b67670eba86957fb9a41e6 | |
parent | Fix(hosts/tiamat): Update to new swapfile uuid (diff) | |
download | nixos-config-81136ec3686d917b714429d58e1df47cb0e6f575.tar.gz nixos-config-81136ec3686d917b714429d58e1df47cb0e6f575.zip |
Fix(bootstrap/install): Removed usage of unassigned variable
-rwxr-xr-x | bootstrap/01_install | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap/01_install b/bootstrap/01_install index cf6ac1cb..712587d8 100755 --- a/bootstrap/01_install +++ b/bootstrap/01_install @@ -52,7 +52,7 @@ ssd_or_hdd="$(cat /sys/block/"$(basename "$(readlink -f "/dev/disk/by-id/$NIX_DI case "$ssd_or_hdd" in 0) msg2 "You seem to use a ssd." - trim_support=$(lsblk --bytes --json --discard | jq --arg name "$disk" '.blockdevices | .[] | select(.name == $name) | (.["disc-gran"] + .["disc-max"]) != 0') + trim_support=$(lsblk --bytes --json --discard | jq --arg name "$(basename "$(readlink -f "/dev/disk/by-id/$NIX_DISK")" | tr -d '\n')" '.blockdevices | .[] | select(.name == $name) | (.["disc-gran"] + .["disc-max"]) != 0') case $trim_support in "true") msg2 "Yay, your ssd supports trim, go on and activate it" @@ -61,7 +61,7 @@ case "$ssd_or_hdd" in msg2 "Nay, your ssd doesn't support trim" ;; *) - warning "Your ssd doesn't seem to exists, if this bothers you please open an issue.'" + warning "Your ssd doesn't seem to exists, if this bothers you please open an issue." ;; esac ;; |