DEBUGGING
This commit is contained in:
@@ -268,9 +268,9 @@ disk_config_generation() {
|
|||||||
TMPFILE="/tmp/nixos-deployment-temp-file"
|
TMPFILE="/tmp/nixos-deployment-temp-file"
|
||||||
|
|
||||||
### --> Get disk information
|
### --> Get disk information
|
||||||
DISK_DETAILS=$(ssh_to_host "
|
DISK_DETAILS=$(ssh_to_host 'bash -s' < "
|
||||||
|
|
||||||
TMPFILE="$TMPFILE"
|
TMPFILE=\"/tmp/nixos-deployment-temp-file\"
|
||||||
|
|
||||||
# Declare arrays and variables
|
# Declare arrays and variables
|
||||||
HDD=1
|
HDD=1
|
||||||
@@ -291,7 +291,7 @@ for DISK in \$(lsblk -x SIZE -d -n -o NAME); do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Disk health
|
# Disk health
|
||||||
if [[ \$(echo "$REMOTE_PASS" | sudo -S smartctl -H /dev/\$DISK 2>/dev/null | grep 'self-assessment' | awk '{print \$6}') == \"PASSED\" ]]; then
|
if [[ \$(echo \"$REMOTE_PASS\" | sudo -S smartctl -H /dev/\$DISK 2>/dev/null | grep 'self-assessment' | awk '{print \$6}') == \"PASSED\" ]]; then
|
||||||
DISK_HEALTH+=(\"PASSED\")
|
DISK_HEALTH+=(\"PASSED\")
|
||||||
else
|
else
|
||||||
DISK_HEALTH+=(\"N/A\")
|
DISK_HEALTH+=(\"N/A\")
|
||||||
|
|||||||
Reference in New Issue
Block a user