diff --git a/elements/base/environment.d/10-SYSTEMD_SYSTEM_UNIT_DIR.bash b/elements/base/environment.d/10-SYSTEMD_SYSTEM_UNIT_DIR.bash new file mode 100644 index 000000000..6780f0a87 --- /dev/null +++ b/elements/base/environment.d/10-SYSTEMD_SYSTEM_UNIT_DIR.bash @@ -0,0 +1,8 @@ +SYSTEMD_PC_FILE="/usr/share/pkgconfig/systemd.pc" +SYSTEMD_SYSTEM_UNIT_DIR="/lib" +if [ -f $SYSTEMD_PC_FILE ]; then + SYSTEMD_SYSTEM_UNIT_DIR=$(awk \ + '/systemdsystemunitdir=/ {split($0,a,"=");print a[2]}' \ + $SYSTEMD_PC_FILE) +fi +export SYSTEMD_SYSTEM_UNIT_DIR