Uses atomic operation for writing config file (#430)

This commit is contained in:
Doug Smith
2020-01-17 16:10:46 -05:00
committed by GitHub
parent c35c4b7e97
commit c534b7d364

View File

@@ -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