mirror of
https://github.com/systemd/systemd.git
synced 2025-03-23 10:50:16 +03:00
main: set $PATH if it isn't set
This commit is contained in:
parent
ee2b489421
commit
09082a94b6
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user