Skip to content

Commit 39a81d7

Browse files
Code Improvement.
Fine-tuning code.
1 parent 8ecda77 commit 39a81d7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MerlinAU.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8780,8 +8780,8 @@ _Unmount_Eject_USB_Drives_()
87808780
local eject_USB_OK=1 usbMountPoint=""
87818781
local curWaitDelaySecs=0
87828782
local theWaitDelaySecs=5
8783-
local maxWaitDelaySecs=150 # Enough time?? #
8784-
local logMsg="Unmount/Eject USB Drives"
8783+
local maxWaitDelaySecs=180 # 3 mins enough time?? #
8784+
local logMsg="Unmount/Eject USB Drive"
87858785

87868786
_MsgToSysLog_() { logger -st "${SCRIPT_NAME}_[$$]" -p 4 "$1" ; }
87878787

@@ -8812,6 +8812,11 @@ _Unmount_Eject_USB_Drives_()
88128812
else _MsgToSysLog_ "$logMsg Wait Timeout [$maxWaitDelaySecs secs] expired."
88138813
fi
88148814

8815+
if [ "$eject_USB_OK" -ne 0 ]
8816+
then
8817+
_MsgToSysLog_ "Unable to unmount USB drive. Device is likely busy."
8818+
fi
8819+
88158820
_MsgToSysLog_ "END of ${logMsg}."
88168821
return "$eject_USB_OK"
88178822
}

0 commit comments

Comments
 (0)