From 81d413ac7082fdfe54bc3b392540f79f824530c9 Mon Sep 17 00:00:00 2001 From: mfgbhatti Date: Mon, 24 Jan 2022 20:20:53 +0000 Subject: [PATCH] updated drivesdd --- startup.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/startup.sh b/startup.sh index 4b6d65c..da84c55 100644 --- a/startup.sh +++ b/startup.sh @@ -163,18 +163,19 @@ keymap () { } drivessd () { -echo -ne " -Is this an ssd? yes/no: -" -read -r ssd_drive - -case $ssd_drive in - y|Y|yes|Yes|YES) - echo "mountoptions=noatime,compress=zstd,ssd,commit=120" >> setup.conf;; - n|N|no|NO|No) - echo "mountoptions=noatime,compress=zstd,commit=120" >> setup.conf;; - *) echo "Wrong option. Try again";drivessd;; -esac + # confirm if ssd is present + read -pr "Is this system using an SSD? yes/no: " _SSD + case "$_SSD" in + y|Y|yes|Yes|YES) + set_option "SSD" 1 + set_option "MOUNTOPTION" "noatime,compress=zstd,ssd,commit=120" + ;; + n|N|no|NO|No) + set_option "SSD" 0 + set_option "MOUNTOPTION" "noatime,compress=zstd,commit=120" + ;; + *) echo "Wrong option. Try again";drivessd;; + esac } # selection for disk type