Change to sleep infinity & read and omit & wait on sleep n (e.g. not infinity)

This commit is contained in:
dougbtv
2021-02-09 15:14:06 -05:00
committed by Tomofumi Hayashi
parent e728da78bc
commit 8bbd3fdcf2

View File

@@ -257,7 +257,7 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
log "Attemping to find master plugin configuration, attempt $tries"
fi
let "tries+=1"
sleep 1 & wait;
sleep 1;
else
error "Multus could not be configured: no master plugin was found."
exit 1;
@@ -401,22 +401,22 @@ if [ "$MULTUS_CLEANUP_CONFIG_ON_EXIT" == true ]; then
# Check and see if the original master plugin configuration exists...
if [ ! -f "$MASTER_PLUGIN_LOCATION" ]; then
log "Master plugin @ $MASTER_PLUGIN_LOCATION has been deleted. Allowing 45 seconds for its restoration..."
sleep 10 & wait
sleep 10
for i in {1..35}
do
if [ -f "$MASTER_PLUGIN_LOCATION" ]; then
log "Master plugin @ $MASTER_PLUGIN_LOCATION was restored. Regenerating given configuration."
break
fi
sleep 1 & wait
sleep 1
done
generateMultusConf
log "Continuing watch loop after configuration regeneration..."
fi
sleep 1 & wait
sleep 1
done
else
log "Entering sleep (success)..."
sleep infinity & wait
read
fi