main: set $PATH if it isn't set

This commit is contained in:
Lennart Poettering 2010-04-07 23:24:41 +02:00
parent ee2b489421
commit 09082a94b6

3
main.c
View file

@ -272,6 +272,9 @@ int main(int argc, char *argv[]) {
assert_se(action == ACTION_RUN || action == ACTION_TEST);
/* Set up PATH unless it is already set */
setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", false);
/* Move out of the way, so that we won't block unmounts */
assert_se(chdir("/") == 0);