Skip to content
Snippets Groups Projects
Commit 200db90d authored by MJB's avatar MJB
Browse files

added configurable clmc service network dependency through environment variable

parent e83ba12b
No related branches found
No related tags found
No related merge requests found
......@@ -112,8 +112,8 @@ chmod 755 $start_script_file
file="/lib/systemd/system/flameclmc.service"
echo "[Unit]" > $file
echo "Description=flameclmc" >> $file
echo "After=flame-fqdn-registration.service" >> $file
echo "Requires=flame-fqdn-registration.service" >> $file
echo "After=${NETWORK_DEPENDENCY}" >> $file
echo "Requires=${NETWORK_DEPENDENCY}" >> $file
echo "" >> $file
echo "[Service]" >> $file
echo "Type=forking" >> $file
......
......@@ -32,6 +32,11 @@ if [[ -z "${SFEMC_FQDN}" ]]; then
exit 1
fi
if [[ -z "${NETWORK_DEPENDENCY}" ]]; then
echo "Failed: cannot find NETWORK_DEPENDENCY environment variable."
exit 1
fi
# Ensure everything runs in directory of the parent script
cd `dirname $0`
......
......@@ -53,7 +53,7 @@ create() {
if [ ${service_name} == "clmc-service" ]; then
cmd="${target_root}/scripts/clmc-service/install.sh"
echo "Provisioning command ${cmd}"
lxc exec ${service_name} --env REPO_ROOT=${target_root} --env SFEMC_FQDN="sfemc.localhost" -- ${cmd}
lxc exec ${service_name} --env REPO_ROOT=${target_root} --env SFEMC_FQDN="sfemc.localhost" --env NETWORK_DEPENDENCY="network.target"-- ${cmd}
exit_code=$?
if [ $exit_code != 0 ]; then
echo "clmc-service installation failed with exit code ${exit_code}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment