From e51e1113bb1e290d46114bff7630af5aac5157c9 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 25 Jul 2021 13:31:00 +0200 Subject: [PATCH] bundles/sysctl: work around debian bug The debian systemd will silently overwrite /etc/sysctl.d/99-sysctl.conf with a symlink to /etc/sysctl.conf. We don't want that. --- .../sysctl/files/{99-sysctl.conf => 98-sysctl.conf} | 0 bundles/sysctl/items.py | 13 +++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) rename bundles/sysctl/files/{99-sysctl.conf => 98-sysctl.conf} (100%) diff --git a/bundles/sysctl/files/99-sysctl.conf b/bundles/sysctl/files/98-sysctl.conf similarity index 100% rename from bundles/sysctl/files/99-sysctl.conf rename to bundles/sysctl/files/98-sysctl.conf diff --git a/bundles/sysctl/items.py b/bundles/sysctl/items.py index f768b4c..4b804e8 100644 --- a/bundles/sysctl/items.py +++ b/bundles/sysctl/items.py @@ -3,11 +3,20 @@ files = { 'content': '#!/bin/sh\n' '\n' - 'cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -e -p -', + 'cat /etc/sysctl.d/*.conf | sysctl -e -p -', 'mode': '0700', }, - '/etc/sysctl.d/99-sysctl.conf': { + '/etc/sysctl.d/98-sysctl.conf': { 'content_type': 'mako', + 'triggers': { + 'action:apply-sysctl-settings', + }, + }, + '/etc/sysctl.conf': { + 'delete': True, + 'triggers': { + 'action:apply-sysctl-settings', + }, }, }