summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2019-06-19 17:16:08 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-06-19 17:16:08 +0000
commite1795a5cd1cb216e5514f55bdb1cddc605f40df3 (patch)
treed52f5256385f4128c520e0431d7ec7e761e82ed0 /systemd
parenta0f863da274fcd631441ba38fa9c7dd438a56480 (diff)
downloadvyos-cloud-init-e1795a5cd1cb216e5514f55bdb1cddc605f40df3.tar.gz
vyos-cloud-init-e1795a5cd1cb216e5514f55bdb1cddc605f40df3.zip
cloud-init-generator: use libexec path to ds-identify on redhat systems
Update the template to use libexec prefix path to ds-identify on redhat systems. LP: #1833264
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/cloud-init-generator.tmpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/systemd/cloud-init-generator.tmpl b/systemd/cloud-init-generator.tmpl
index cfa5eb53..45efa243 100755
--- a/systemd/cloud-init-generator.tmpl
+++ b/systemd/cloud-init-generator.tmpl
@@ -82,7 +82,12 @@ default() {
}
check_for_datasource() {
- local ds_rc="" dsidentify="/usr/lib/cloud-init/ds-identify"
+ local ds_rc=""
+{% if variant in ["redhat", "fedora", "centos"] %}
+ local dsidentify="/usr/libexec/cloud-init/ds-identify"
+{% else %}
+ local dsidentify="/usr/lib/cloud-init/ds-identify"
+{% endif %}
if [ ! -x "$dsidentify" ]; then
debug 1 "no ds-identify in $dsidentify. _RET=$FOUND"
return 0