From 05a2e501ce0494874921669ba370ac046442642f Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 9 Mar 2022 13:04:34 +0100 Subject: [PATCH] bundles/bird: support arch linux --- bundles/bird/items.py | 10 +++++++--- bundles/bird/metadata.py | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/bundles/bird/items.py b/bundles/bird/items.py index 58a281c..38a1549 100644 --- a/bundles/bird/items.py +++ b/bundles/bird/items.py @@ -1,5 +1,10 @@ +if node.os == 'arch': + filename = '/etc/bird.conf' +else: + filename = '/etc/bird/bird.conf' + files = { - '/etc/bird/bird.conf': { + filename: { 'content_type': 'mako', 'triggers': { 'svc_systemd:bird:reload', @@ -10,8 +15,7 @@ files = { svc_systemd = { 'bird': { 'needs': { - 'file:/etc/bird/bird.conf', - 'pkg_apt:bird2', + f'file:{filename}', }, }, } diff --git a/bundles/bird/metadata.py b/bundles/bird/metadata.py index 15d3fe9..fd285d3 100644 --- a/bundles/bird/metadata.py +++ b/bundles/bird/metadata.py @@ -5,7 +5,20 @@ from bundlewrap.metadata import atomic defaults = { 'apt': { 'packages': { - 'bird2': {}, + 'bird2': { + 'needed_by': { + 'svc_systemd:bird', + }, + }, + }, + }, + 'pacman': { + 'packages': { + 'bird': { + 'needed_by': { + 'svc_systemd:bird', + }, + }, }, }, 'sysctl': {