bundlewrap/bundles/sysctl/items.py
Franziska Kunsmann e51e1113bb
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.
2021-07-25 13:31:00 +02:00

40 lines
847 B
Python

files = {
'/usr/local/sbin/apply-sysctl': {
'content':
'#!/bin/sh\n'
'\n'
'cat /etc/sysctl.d/*.conf | sysctl -e -p -',
'mode': '0700',
},
'/etc/sysctl.d/98-sysctl.conf': {
'content_type': 'mako',
'triggers': {
'action:apply-sysctl-settings',
},
},
'/etc/sysctl.conf': {
'delete': True,
'triggers': {
'action:apply-sysctl-settings',
},
},
}
directories = {
'/etc/sysctl.d': {
'purge': True,
'triggers': {
'action:apply-sysctl-settings',
},
},
}
actions = {
'apply-sysctl-settings': {
'command': '/usr/local/sbin/apply-sysctl',
'triggered': True,
'needs': {
'file:/usr/local/sbin/apply-sysctl',
},
},
}