about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap/01_install4
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
         ;;