From 09082a94b64f0b3b6cec44d4d8f423ab9abd1630 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 7 Apr 2010 23:24:41 +0200 Subject: [PATCH] main: set $PATH if it isn't set --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 397e868e..ea001b18 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); -- 2.39.5