]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix initial run level
authorDenis Rizaev <Denis.Rizaev@trueoffice.ru>
Mon, 24 May 2010 13:06:36 +0000 (15:06 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 24 May 2010 13:06:36 +0000 (15:06 +0200)
I did a little investigation about runlevels and i think we can assume
runlevels 2-5 as normal. So, we can check if system was in runlevel 2-5
and proc count is 1 and now we are in 0/6.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis Rizaev <Denis.Rizaev@trueoffice.ru>
src/lxc/utmp.c

index 9b79656dd25a162ead39e0493b68144d56e2e01f..319a5cee0a2f41716ee5942190636ccc9a599211 100644 (file)
@@ -83,7 +83,7 @@ static int utmp_handler(int fd, void *data, struct lxc_epoll_descr *descr)
                goto out;
        }
 
-       if (ntasks == 1 && prevrun_level == '3') {
+       if (ntasks == 1 && prevrun_level > '1' && prevrun_level < '6') {
 
                DEBUG("run level is %c/%c", prevrun_level, currun_level);
                DEBUG("there is %d tasks remaining", ntasks);