diff options
author | Robert Schweikert <rjschwei@suse.com> | 2019-01-28 17:51:57 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-01-28 17:51:57 +0000 |
commit | 09dcecf37628c5809ae21d7785693cb7358ca94c (patch) | |
tree | ee63eb7fad8ceba60af3ed2e940b37c8919a5355 /systemd | |
parent | 3f12012eba2aabb6ca7b3ef70bc33a4aa1edada4 (diff) | |
download | vyos-cloud-init-09dcecf37628c5809ae21d7785693cb7358ca94c.tar.gz vyos-cloud-init-09dcecf37628c5809ae21d7785693cb7358ca94c.zip |
systemd: Render generator from template to account for system differences.
The systemd generator used had a hard coded path for the location target
file to create. This path does not apply to all distributions.
Make the generator and template to have the path set during build time.
Diffstat (limited to 'systemd')
-rwxr-xr-x | systemd/cloud-init-generator.tmpl (renamed from systemd/cloud-init-generator) | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator.tmpl index bd9f2678..cfa5eb53 100755 --- a/systemd/cloud-init-generator +++ b/systemd/cloud-init-generator.tmpl @@ -1,3 +1,4 @@ +## template:jinja #!/bin/sh set -f @@ -9,7 +10,11 @@ DISABLE="disabled" FOUND="found" NOTFOUND="notfound" RUN_ENABLED_FILE="$LOG_D/$ENABLE" +{% if variant in ["suse"] %} +CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target" +{% else %} CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" +{% endif %} CLOUD_TARGET_NAME="cloud-init.target" # lxc sets 'container', but lets make that explicitly a global CONTAINER="${container}" |