]> git.ipfire.org Git - thirdparty/systemd.git/blame - mkosi.postinst
man: don't mention Socket files in Scope man page
[thirdparty/systemd.git] / mkosi.postinst
CommitLineData
1b6f9b98
DDM
1#!/bin/sh
2# SPDX-License-Identifier: LGPL-2.1-or-later
3
69d638e6
DDM
4if [ "$1" = "final" ]; then
5 if command -v bootctl > /dev/null && [ -d "/efi" ]; then
6 bootctl install
7 fi
8
5a4327d1
DDM
9 cat >> /root/.gdbinit <<EOF
10set debuginfod enabled off
11set build-id-verbose 0
12EOF
13
69d638e6
DDM
14 if [ -n "$SANITIZERS" ]; then
15 # ASAN and syscall filters aren't compatible with each other.
16 find / -name '*.service' -type f -exec sed -i 's/^\(MemoryDeny\|SystemCall\)/# \1/' {} +
17
18 # `systemd-hwdb update` takes > 50s when built with sanitizers so let's not run it by default.
19 systemctl mask systemd-hwdb-update.service
20 fi
37d35150
DDM
21
22 # Make sure dnsmasq.service doesn't start on boot on Debian/Ubuntu.
23 rm -f /etc/systemd/system/multi-user.target.wants/dnsmasq.service
1b6f9b98 24fi
24acd406
FS
25
26# Temporary workaround until https://github.com/openSUSE/suse-module-tools/commit/158643414ddb8d8208016a5f03a4484d58944d7a
27# gets into OpenSUSE repos
28if [ "$1" = "final" ] && grep -q openSUSE /etc/os-release; then
29 if [ -e "/usr/lib/systemd/system/boot-sysctl.service" ] && \
30 ! grep -F -q 'ConditionPathExists=/boot/sysctl.conf' "/usr/lib/systemd/system/boot-sysctl.service"; then
31 mkdir -p "/etc/systemd/system/boot-sysctl.service.d/"
32 printf '[Unit]\nConditionPathExists=/boot/sysctl.conf-%%v' >"/etc/systemd/system/boot-sysctl.service.d/99-temporary-workaround.conf"
33 fi
34fi