Re-evaluate sys after running initsh.

This commit is contained in:
Roy Marples 2008-10-10 14:53:50 +00:00
parent 10cb4c18df
commit da94fad3f5

View File

@ -559,6 +559,11 @@ static void do_newlevel(const char *newlevel)
setenv("RC_RUNLEVEL", newlevel, 1);
run_program(INITSH);
/* init may have mounted /proc so we can now detect or real
* sys */
if ((sys = rc_sys()))
setenv("RC_SYS", sys, 1);
} else if (strcmp(newlevel, RC_LEVEL_SINGLE) == 0) {
#ifndef PREFIX
if (! RUNLEVEL ||