Merge "Add another path for service files"

This commit is contained in:
Zuul 2018-03-09 21:40:15 +00:00 committed by Gerrit Code Review
commit b7a20e2f3c
1 changed files with 6 additions and 1 deletions

View File

@ -44,7 +44,12 @@ exec os-collect-config 2>&1 | logger -t os-collect-config
eof
elif [ "$DIB_INIT_SYSTEM" == "systemd" ] ; then
cat > /lib/systemd/system/os-collect-config.service <<eof
if [ -d "/lib/systemd" ]; then
path=/lib/systemd/system/os-collect-config.service
else
path=/usr/lib/systemd/system/os-collect-config.service
fi
cat > $path <<eof
[Unit]
Description=Collect metadata and run hook commands.
After=cloud-config.service