commit:     96e0294f0892d355cf6f632b9848c06a2cd2578d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  6 19:21:53 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec  6 19:21:53 2019 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=96e0294f

Add env gen to inject full Gentoo PATH to services

Bug: https://bugs.gentoo.org/651904
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 Makefile.am                                  | 5 +++++
 system-environment-generators/10-gentoo-path | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 4482c77..0d4c179 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,11 @@ dist_systemdsystempreset_DATA = \
 dist_systemdsystemgenerator_SCRIPTS = \
        system-generators/gentoo-local-generator
 
+# note: this needs to go into /usr, not /
+systemdsystemenvironmentgeneratordir = 
$(prefix)/lib/systemd/system-environment-generators
+dist_systemdsystemenvironmentgenerator_SCRIPTS = \
+       system-environment-generators/10-gentoo-path
+
 udevrulesdir = $(udevdir)/rules.d
 dist_udevrules_DATA = udev/40-gentoo.rules
 

diff --git a/system-environment-generators/10-gentoo-path 
b/system-environment-generators/10-gentoo-path
new file mode 100644
index 0000000..4976fb4
--- /dev/null
+++ b/system-environment-generators/10-gentoo-path
@@ -0,0 +1,3 @@
+#!/bin/sh
+. /etc/profile.env
+echo "PATH=${PATH}"

Reply via email to