Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
service_reload "bird.service"
}
+bird_enable() {
+ # Generate configuration file
+ if ! bird_generate_config; then
+ log ERROR "Could not write Bird configuration"
+ return ${EXIT_ERROR}
+ fi
+
+ # Enable the service to be automatically started next time
+ service_enable "bird.service"
+
+ # Start it now
+ bird_start
+}
+
# Update configuration any apply it in one go
bird_update() {
if ! bird_generate_config; then
}
route_apply() {
- # Re-generate BIRD configuration
- bird_generate_config
-
- # Reload the daemon
- bird_reload
+ # Update bird
+ bird_update
}
route_entry_add() {
# Update resolv.conf(5) when initializing the network
dns_generate_resolvconf
- # Update bird configuration
- bird_generate_config
+ # Make sure bird is running
+ bird_enable
# Also execute all triggers
triggers_execute_all "init"