Skip to content

Commit

Permalink
Uses atomic operation for writing config file (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbtv committed Jan 17, 2020
1 parent c35c4b7 commit c534b7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
}
EOF
)
echo $CONF > $CNI_CONF_DIR/00-multus.conf
tmpfile=$(mktemp)
echo $CONF > $tmpfile
mv $tmpfile $CNI_CONF_DIR/00-multus.conf
log "Config file created @ $CNI_CONF_DIR/00-multus.conf"
echo $CONF

Expand Down

0 comments on commit c534b7d

Please sign in to comment.