Add another path for service files
In opensuse the service files are located in /usr/lib rather than /lib. This change adds this path as an option. Change-Id: I99c2db557a2290c3860bb41233d7efc35d03be0b
This commit is contained in:
parent
fd70072385
commit
2c60bbf6d5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue