From 8ff3518040fdd6935e7829f3fb8415c9cf191792 Mon Sep 17 00:00:00 2001 From: Denis Rizaev Date: Mon, 24 May 2010 15:06:36 +0200 Subject: [PATCH] fix initial run level 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 Signed-off-by: Denis Rizaev --- src/lxc/utmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c index 9b79656dd..319a5cee0 100644 --- a/src/lxc/utmp.c +++ b/src/lxc/utmp.c @@ -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);