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);
|
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 */
|
/* Move out of the way, so that we won't block unmounts */
|
||||||
assert_se(chdir("/") == 0);
|
assert_se(chdir("/") == 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue