]> git.ipfire.org Git - thirdparty/systemd.git/blame - mkosi.postinst
Merge pull request #24250 from yuwata/backlight-multiple-graphics-cards
[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
1b6f9b98 21fi
24acd406
FS
22
23# Temporary workaround until https://github.com/openSUSE/suse-module-tools/commit/158643414ddb8d8208016a5f03a4484d58944d7a
24# gets into OpenSUSE repos
25if [ "$1" = "final" ] && grep -q openSUSE /etc/os-release; then
26 if [ -e "/usr/lib/systemd/system/boot-sysctl.service" ] && \
27 ! grep -F -q 'ConditionPathExists=/boot/sysctl.conf' "/usr/lib/systemd/system/boot-sysctl.service"; then
28 mkdir -p "/etc/systemd/system/boot-sysctl.service.d/"
29 printf '[Unit]\nConditionPathExists=/boot/sysctl.conf-%%v' >"/etc/systemd/system/boot-sysctl.service.d/99-temporary-workaround.conf"
30 fi
31fi