Reduce sw-patch init script controller ping timeout for simplex systems
The DELAY_SEC variable in the sw-patch init script controls how long the service waits for an active controller to respond before proceeding. The default is 120 seconds. On simplex (AIO-SX) systems, this wait always times out since there is no active 'controller', resulting in an unnecessary 2-minute delay during reboot or unlock operations. This update significantly reduces the timeout delay on simplex systems, improving boot and unlock responsiveness without affecting duplex systems. Test Plan: PASS: Verify build and install on AIO-SX PASS: Verify build and install on AIO-DX PASS: Verify unlock of AIO-SX is not delayed by sw-patch timeout PASS: Verify sw-patch times out after ~10s with no controller ping (SX) PASS: Verify sw-patch still uses 120s timeout on AIO-DX Closes-Bug: 2111941 Change-Id: I46d33e87897e2ae67011241f9f83ae0d153f19ce Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
@@ -102,7 +102,15 @@ fi
|
|||||||
# If the management interface is bonded, it may take some time
|
# If the management interface is bonded, it may take some time
|
||||||
# before communications can be properly setup.
|
# before communications can be properly setup.
|
||||||
# Allow up to $DELAY_SEC seconds to reach controller.
|
# Allow up to $DELAY_SEC seconds to reach controller.
|
||||||
|
|
||||||
|
if [ "${system_mode}" = "simplex" ]; then
|
||||||
|
# Make the delay for simplex systems smaller.
|
||||||
|
# There is no active controller during reboot.
|
||||||
|
DELAY_SEC=10
|
||||||
|
else
|
||||||
DELAY_SEC=120
|
DELAY_SEC=120
|
||||||
|
fi
|
||||||
|
|
||||||
START=`date +%s`
|
START=`date +%s`
|
||||||
FOUND=0
|
FOUND=0
|
||||||
while [ $(date +%s) -lt $(( ${START} + ${DELAY_SEC} )) ]; do
|
while [ $(date +%s) -lt $(( ${START} + ${DELAY_SEC} )) ]; do
|
||||||
|
Reference in New Issue
Block a user