2022-10-19 07:10:15 -04:00
|
|
|
#!/usr/bin/env bash
|
2022-10-11 05:34:57 -04:00
|
|
|
# Copyright (c) Edgeless Systems GmbH
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2022-10-19 07:10:15 -04:00
|
|
|
set -euxo pipefail
|
|
|
|
|
|
|
|
# recreate kubelet systemd unit after reboot.
|
|
|
|
# tmpfile config has to be written late as it interferes with the systemd-nspawn build environment
|
|
|
|
cat >"${BUILDROOT}/usr/lib/tmpfiles.d/kubelet-service.conf" <<EOF
|
|
|
|
C /run/systemd/system/kubelet.service - - - - /run/state/systemd/system/kubelet.service
|
|
|
|
C /run/systemd/system/kubelet.service.d/10-kubeadm.conf - - - - /run/state/systemd/system/kubelet.service.d/10-kubeadm.conf
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# cleanup dracut generation files (disk-mapper) to save space
|
|
|
|
rm -rf "${BUILDROOT}/usr/lib/dracut/modules.d/39constellation-mount/"
|