From da94fad3f517c3b95c4eb1f3ee55bfe48b3f4783 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 10 Oct 2008 14:53:50 +0000 Subject: [PATCH] Re-evaluate sys after running initsh. --- src/rc/rc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rc/rc.c b/src/rc/rc.c index 4b76a6de..d1446cdb 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -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 ||