Hi, I'm interested in rollbacking misconfigured network configs back to last working state. Old config is stored by etckeeper which uses git.
Can this be achieved with systemd itself or do I have to write whole script/program that listens to systemd dbus? If it's script/program it will be something like: -Hook into "systemd restart" in dbus and if possible, directly into "restart systemd-networkd" -If event contains that restart failed, use that; otherwise read "systemctl is-active systemd-networkd" -Rename broken file to $file.broken -Restore: etckeeper vcs reset -- $file -"systemctl stop that-network-restart-hook-script.service" (so that there's no infinite loop) -"systemctl restart systemd-networkd" -Works -> "systemctl start automatic-net-configuration-rollback.service" -Doesn't -> echo "Rollbacked config file doesn't work either. Repair your network config file manually and start automatic rollback script service after it works." Also is there any kind of config file tester so it could be also run before. Something like: # systemd-config --test my-config.network File is broken! # echo $? # 1 -- Pekka Järvinen
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel