bundles/postfix: fix some needed files not being present in chroot on arch
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
8f4db6f2ba
commit
b193971625
2 changed files with 17 additions and 1 deletions
6
bundles/postfix/files/arch-override.conf
Normal file
6
bundles/postfix/files/arch-override.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Service]
|
||||
# arch postfix is not set up for chrooting by default
|
||||
ExecStartPre=-/usr/sbin/mkdir -p /var/spool/postfix/etc
|
||||
% for file in ['/etc/localtime', '/etc/nsswitch.conf', '/etc/resolv.conf', '/etc/services']:
|
||||
ExecStartPre=-/usr/sbin/cp -p ${file} /var/spool/postfix${file}
|
||||
% endfor
|
|
@ -21,7 +21,7 @@ for identifier in node.metadata.get('postfix/mynetworks', set()):
|
|||
netmask = '128'
|
||||
mynetworks.add(f'[{ip6}]/{netmask}')
|
||||
|
||||
my_package = 'pkg_pacman:postfix' if node.has_bundle('pacman') else 'pkg_apt:postfix'
|
||||
my_package = 'pkg_pacman:postfix' if node.os == 'arch' else 'pkg_apt:postfix'
|
||||
|
||||
files = {
|
||||
'/etc/mailname': {
|
||||
|
@ -86,3 +86,13 @@ svc_systemd = {
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
if node.os == 'arch':
|
||||
files['/etc/systemd/system/postfix.service.d/bundlewrap.conf'] = {
|
||||
'source': 'arch-override.conf',
|
||||
'content_type': 'mako',
|
||||
'triggers': {
|
||||
'action:systemd-reload',
|
||||
'svc_systemd:postfix:restart',
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue