aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc/openrc-init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c
index eb346f59..de570e56 100644
--- a/src/rc/openrc-init.c
+++ b/src/rc/openrc-init.c
@@ -35,6 +35,7 @@
#include "rc-wtmp.h"
#include "version.h"
+static const char *path_default = "/sbin:/usr/sbin:/bin:/usr/bin";
static const char *rc_default_runlevel = "default";
static pid_t do_openrc(const char *runlevel)
@@ -183,6 +184,9 @@ int main(int argc, char **argv)
sigaction(SIGINT, &sa, NULL);
reboot(RB_DISABLE_CAD);
+ /* set default path */
+ setenv("PATH", path_default, 1);
+
if (! reexec)
init(default_runlevel);