]>
Commit | Line | Data |
---|---|---|
1b6f9b98 DDM |
1 | #!/bin/sh |
2 | # SPDX-License-Identifier: LGPL-2.1-or-later | |
3 | ||
4 | if [ "$1" = "final" ] && command -v bootctl > /dev/null; then | |
5 | bootctl install | |
6 | fi | |
24acd406 FS |
7 | |
8 | # Temporary workaround until https://github.com/openSUSE/suse-module-tools/commit/158643414ddb8d8208016a5f03a4484d58944d7a | |
9 | # gets into OpenSUSE repos | |
10 | if [ "$1" = "final" ] && grep -q openSUSE /etc/os-release; then | |
11 | if [ -e "/usr/lib/systemd/system/boot-sysctl.service" ] && \ | |
12 | ! grep -F -q 'ConditionPathExists=/boot/sysctl.conf' "/usr/lib/systemd/system/boot-sysctl.service"; then | |
13 | mkdir -p "/etc/systemd/system/boot-sysctl.service.d/" | |
14 | printf '[Unit]\nConditionPathExists=/boot/sysctl.conf-%%v' >"/etc/systemd/system/boot-sysctl.service.d/99-temporary-workaround.conf" | |
15 | fi | |
16 | fi |