generate-env: Added both user-environment-generators and system-environment-generators

This commit is contained in:
Tobias Schmidl 2023-03-10 13:27:44 +01:00
parent 6197d0a18f
commit af2db6de57

View file

@ -1,7 +1,10 @@
#! /bin/sh
if [ -d /usr/lib/systemd/system-environment-generators ];
if [ -d /usr/lib/systemd/user-environment-generators ];
then
run-parts /usr/lib/systemd/user-environment-generators
elif [ -d /usr/lib/systemd/system-environment-generators ];
then
run-parts /usr/lib/systemd/system-environment-generators
else
cat "$HOME"/.config/environment.d/*
fi | grep -v '#' | grep -v '^[[:space:]]*$' | while read -r cur_env; do export "${cur_env?}"; done