constellation/image/mkosi.skeleton/usr/lib/dracut/modules.d/38azure-provision/module-setup.sh
Paul Meyer cca02597c8 image: remove bash options from sourced scripts
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2022-11-17 11:28:49 +01:00

35 lines
714 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) Edgeless Systems GmbH
#
# SPDX-License-Identifier: AGPL-3.0-only
# Note: This script is sourced.
depends() {
echo systemd
}
install_and_enable_unit() {
unit="$1"
shift
target="$1"
shift
inst_simple "${moddir:?}/${unit}" "${systemdsystemunitdir:?}/${unit}"
mkdir -p "${initdir:?}${systemdsystemconfdir:?}/${target}.wants"
ln_r "${systemdsystemunitdir}/${unit}" \
"${systemdsystemconfdir}/${target}.wants/${unit}"
}
install() {
inst_multiple \
bash \
curl \
grep \
sed
inst_script "${moddir}/azure-provisioning.sh" \
"/usr/local/bin/azure-provisioning"
install_and_enable_unit "azure-provisioning.service" \
"basic.target"
}