#!/bin/sh # SPDX-License-Identifier: LGPL-2.1-or-later if [ "$1" = "build" ]; then exit 0 fi if [ -n "$SANITIZERS" ]; then LD_PRELOAD=$(ldd /usr/lib/systemd/systemd | grep libasan.so | awk '{print $3}') mkdir -p /etc/systemd/system.conf.d cat >/etc/systemd/system.conf.d/10-asan.conf </etc/systemd/system/systemd-journald.service.d/10-stdout-tty.conf </etc/systemd/system/console-getty.service.d/10-no-vhangup.conf < 50s when built with sanitizers so let's not run it by default. systemctl mask systemd-hwdb-update.service fi if [ -n "$IMAGE_ID" ] ; then sed -n \ -i \ -e '/^IMAGE_ID=/!p' \ -e "\$aIMAGE_ID=$IMAGE_ID" \ /usr/lib/os-release fi if [ -n "$IMAGE_VERSION" ] ; then sed -n \ -i \ -e '/^IMAGE_VERSION=/!p' \ -e "\$aIMAGE_VERSION=$IMAGE_VERSION" \ /usr/lib/os-release fi if command -v authselect >/dev/null; then authselect select minimal if authselect list-features minimal | grep -q "with-homed"; then authselect enable-feature with-homed fi fi # Let tmpfiles.d/systemd-resolve.conf handle the symlink rm -f /etc/resolv.conf