Some important daemons need system-level shared environment variables
such as DISPLAY. For this purpose, this patch generates the Environment
file for system daemon in /run directory.
Change-Id: I824eff47e355502a82124ef07e375a50eb6f2ad4
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
--- /dev/null
+#!/bin/sh
+echo "############### tv-generate-env.post ################"
+
+cat > /usr/lib/systemd/system/tizen-system-env.service << EOF
+[Unit]
+Description=Generate environment from /etc/profile.d
+DefaultDependencies=no
+Before=basic.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/env -i sh -c 'source /etc/profile; env | /bin/egrep -v "^(HOME|PWD|SHLVL|_|USER|MAIL|LOGNAME)=" > /run/tizen-system-env'
+
+[Install]
+WantedBy=basic.target
+EOF
+
+mkdir -p /usr/lib/systemd/system/basic.target.wants
+ln -s ../tizen-system-env.service /usr/lib/systemd/system/basic.target.wants/tizen-system-env.service
- tv-x11
- tv-mbr-3parts
- tv-users
+ - tv-generate-env
Repos: []
NoChrootScripts:
- buildname