From: Lennart Poettering Date: Tue, 26 Oct 2010 00:32:02 +0000 (+0200) Subject: main: don't unset HOME/TERM when run in session mode X-Git-Tag: v12~156 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=39439087bf398c7d5b5baf1e79460f439b2f5ad9 main: don't unset HOME/TERM when run in session mode --- diff --git a/TODO b/TODO index 9a7ee43de..938ee49ab 100644 --- a/TODO +++ b/TODO @@ -82,6 +82,8 @@ * make sure swap.target doesn't pull in partitions multiple times +* make description of .swap files nicer: resolve /dev/by-uuid/ symlink + External: * patch kernel to add /proc/swaps change notifications diff --git a/src/main.c b/src/main.c index 9a51a9187..50325e128 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);