From 9e22837c37519340ea1ea9c7db58184a7b54a205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Tue, 25 Oct 2005 16:21:34 +0000 Subject: [PATCH] - detect if run inside vserver and ignore rc_splash if so svn-id: @6482 --- rc.d/init.d/functions | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 90dd50d8..b93171b8 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -51,6 +51,16 @@ CCHARS="$NORMAL" # Color of these characters (look at /etc/sysconfig/init-colors [ -z "$COLUMNS" ] && COLUMNS=80 +if [ -z "$VSERVER" -o "$VSERVER" = "detect" ]; then + _ctx="$(awk '/s_context:.*/ { print $2 }' /proc/self/status 2>/dev/null)" + if [ -z "$_ctx" -o "$_ctx" = "0" ]; then + VSERVER=no + else + VSERVER=yes + fi + unset _ctx +fi + is_yes() { # Test syntax @@ -251,7 +261,7 @@ rc_splash() action="$1" - if ! is_no "$BOOT_SPLASH"; then + if ! is_no "$BOOT_SPLASH" && ! is_yes "$VSERVER"; then [ -x /bin/splash ] && /bin/splash "$action" fi -- 2.44.0