Skip to content

Commit

Permalink
Change to sleep infinity & read and omit & wait on sleep n (e.g. not …
Browse files Browse the repository at this point in the history
…infinity)
  • Loading branch information
dougbtv committed Feb 9, 2021
1 parent 63734fc commit de22e52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,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;
Expand Down Expand Up @@ -397,22 +397,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
sleep infinity & read
fi

0 comments on commit de22e52

Please sign in to comment.