init.sls 1001 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # systemd related stuff
  3. #
  4. # Define systemd daemon-reload command to pull in if required
  5. systemctl-daemon-reload:
  6. cmd.wait:
  7. - name: systemctl daemon-reload
  8. - watch: []
  9. #
  10. # Install service to wait for routing adjancies to come up (if needed)
  11. #
  12. /etc/systemd/system/wait-for-routes.service:
  13. file.managed:
  14. - source: salt://systemd/wait-for-routes.service
  15. - watch_in:
  16. - cmd: systemctl-daemon-reload
  17. wait-for-routes.service:
  18. service.running:
  19. - enable: true
  20. - require:
  21. - file: /etc/systemd/system/wait-for-routes.service
  22. - file: /usr/local/sbin/wait-for-routes
  23. /usr/local/sbin/wait-for-routes:
  24. file.managed:
  25. - source: salt://systemd/wait-for-routes
  26. - mode: 755
  27. #
  28. # Unfuck systemd defaults likely to break stuff
  29. #
  30. {% if grains.oscodename == "bullseye" %}
  31. /etc/systemd/network/90-unfuck-mac-overwrite.link:
  32. file.managed:
  33. - source: salt://systemd/90-unfuck-mac-overwrite.link
  34. - watch_in:
  35. - cmd: systemctl-daemon-reload
  36. {% endif %}