rc-scripts/trunk/rc.d/init.d/functions

baggins cvs at pld-linux.org
Tue Oct 25 18:21:38 CEST 2005


Author: baggins
Date: Tue Oct 25 18:21:34 2005
New Revision: 6482

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- detect if run inside vserver and ignore rc_splash if so


Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions	(original)
+++ rc-scripts/trunk/rc.d/init.d/functions	Tue Oct 25 18:21:34 2005
@@ -51,6 +51,16 @@
 
 [ -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 @@
 
 	action="$1"
 
-	if ! is_no "$BOOT_SPLASH"; then
+	if ! is_no "$BOOT_SPLASH" && ! is_yes "$VSERVER"; then
 		[ -x /bin/splash ] && /bin/splash "$action"
 	fi
 



More information about the pld-cvs-commit mailing list