blob: 385503f01c3bcceaf4dc419c54f853e4390682d3 [file] [log] [blame]
#!/bin/bash
CONFIG_FILE=/cfg/sysrepo/startup.json
NEW_COPY=/cfg/sysrepo/startup.json.2
sysrepocfg -d startup -f json -X > ${NEW_COPY}
if [ ! -s ${NEW_COPY} ]; then
logger -p user.emerg "Corrupted sysrepo configuration dump"
exit 1
fi
sync ${NEW_COPY}
mv ${NEW_COPY} ${CONFIG_FILE}
sync ${CONFIG_FILE}