saving uncommitted changes in /etc prior to dnf run

This commit is contained in:
2021-11-19 17:00:16 +02:00
parent f23841d0d1
commit 24059f4289
82 changed files with 608 additions and 98 deletions

View File

@@ -3,6 +3,9 @@
SERVERFILE=$SAVEDIR/chrony.servers.$interface
chrony_config() {
# Disable modifications if called from a NM dispatcher script
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
rm -f "$SERVERFILE"
if [ "$PEERNTP" != "no" ]; then
for server in $new_ntp_servers; do
@@ -13,6 +16,8 @@ chrony_config() {
}
chrony_restore() {
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
if [ -f "$SERVERFILE" ]; then
rm -f "$SERVERFILE"
/usr/libexec/chrony-helper update-daemon || :