summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-26 02:32:02 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-26 02:32:02 +0200
commit39439087bf398c7d5b5baf1e79460f439b2f5ad9 (patch)
treee80d98d83eb8e1d24b81eafa458b9d10592e9a41 /src/main.c
parentd9be8f8f323a0e3ee61f9bd1322ed12d80479259 (diff)
main: don't unset HOME/TERM when run in session mode
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 9a51a9187f..50325e1285 100644
--- a/src/main.c
+++ b/src/main.c
@@ -975,8 +975,10 @@ int main(int argc, char *argv[]) {
/* Unset some environment variables passed in from the kernel
* that don't really make sense for us. */
- unsetenv("HOME");
- unsetenv("TERM");
+ if (arg_running_as == MANAGER_SYSTEM) {
+ unsetenv("HOME");
+ unsetenv("TERM");
+ }
/* Move out of the way, so that we won't block unmounts */
assert_se(chdir("/") == 0);