mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 06:30:30 +00:00
main: set $PATH if it isn't set
This commit is contained in:
3
main.c
3
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user