1
0
mirror of https://github.com/systemd/systemd synced 2024-07-05 17:39:42 +00:00
systemd/mkosi.postinst
Frantisek Sumsal 24acd4064e ci: check for failed services after boot
This should, hopefully, catch issues like systemd/systemd#21671
automagically.
2021-12-10 10:25:43 +01:00

17 lines
746 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
if [ "$1" = "final" ] && command -v bootctl > /dev/null; then
bootctl install
fi
# Temporary workaround until https://github.com/openSUSE/suse-module-tools/commit/158643414ddb8d8208016a5f03a4484d58944d7a
# gets into OpenSUSE repos
if [ "$1" = "final" ] && grep -q openSUSE /etc/os-release; then
if [ -e "/usr/lib/systemd/system/boot-sysctl.service" ] && \
! grep -F -q 'ConditionPathExists=/boot/sysctl.conf' "/usr/lib/systemd/system/boot-sysctl.service"; then
mkdir -p "/etc/systemd/system/boot-sysctl.service.d/"
printf '[Unit]\nConditionPathExists=/boot/sysctl.conf-%%v' >"/etc/systemd/system/boot-sysctl.service.d/99-temporary-workaround.conf"
fi
fi