From 666835cd65e7934ca1951456736d6f5eef9f64fc Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Mon, 13 Jun 2022 19:52:48 -0500 Subject: [PATCH] Improve drive format consistency by swapping driver prior to format --- rootfs/standard/usr/bin/mount_drive.tcl | 3 +++ rootfs/standard/usr/bin/mynode_usb_driver_check.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rootfs/standard/usr/bin/mount_drive.tcl b/rootfs/standard/usr/bin/mount_drive.tcl index 0bb9128f..e2e8c122 100755 --- a/rootfs/standard/usr/bin/mount_drive.tcl +++ b/rootfs/standard/usr/bin/mount_drive.tcl @@ -78,6 +78,9 @@ proc createMyNodeFsOnBlockDevice {blockDevice} { } if [catch { + # Run USB check to make sure we are using a good driver + runCommand /usr/bin/mynode_usb_driver_check.sh > /dev/null + puts "Waiting on format confirmation..." runCommand echo "drive_format_confirm" > /tmp/.mynode_status while { [file exists "/tmp/format_ok"] == 0 } { diff --git a/rootfs/standard/usr/bin/mynode_usb_driver_check.sh b/rootfs/standard/usr/bin/mynode_usb_driver_check.sh index 0f3b88c5..375ddd15 100755 --- a/rootfs/standard/usr/bin/mynode_usb_driver_check.sh +++ b/rootfs/standard/usr/bin/mynode_usb_driver_check.sh @@ -2,7 +2,7 @@ set -x -source /usr/share/mynode/mynode_config.sh +source /usr/share/mynode/mynode_device_info.sh # Allow UAS if [ -f /mnt/hdd/mynode/settings/.uas_usb_enabled ] || [ -f /home/bitcoin/.mynode/.uas_usb_enabled ]; then