summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-07 23:24:41 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-07 23:24:50 +0200
commit09082a94b64f0b3b6cec44d4d8f423ab9abd1630 (patch)
treecb8dbfd6621a425f1e579cf45852631509744b22
parentee2b489421ce8b47c08fb42c598c5af47043a9f9 (diff)
main: set $PATH if it isn't set
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index 397e868e97..ea001b18b0 100644
--- a/main.c
+++ b/main.c
@@ -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);