SOURCES: vprocunhide.init - exit early if non vserver kernel is bo...

glen glen at pld-linux.org
Tue Jul 3 20:25:17 CEST 2007


Author: glen                         Date: Tue Jul  3 18:25:17 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- exit early if non vserver kernel is booted

---- Files affected:
SOURCES:
   vprocunhide.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/vprocunhide.init
diff -u SOURCES/vprocunhide.init:1.6 SOURCES/vprocunhide.init:1.7
--- SOURCES/vprocunhide.init:1.6	Tue Jul  3 20:21:47 2007
+++ SOURCES/vprocunhide.init	Tue Jul  3 20:25:12 2007
@@ -5,6 +5,15 @@
 # chkconfig: 2345 26 74
 # description: Makes some /proc entries visibly for vservers
 
+# if kernel not capable, exit early
+if [ ! -d /proc/virtual ]; then
+	case "$1" in
+		start|stop|restart|force-reload)
+		exit 0
+		;;
+	esac
+fi
+
 # Source function library.
 . /etc/rc.d/init.d/functions
 
@@ -16,12 +25,6 @@
 . "$UTIL_VSERVER_VARS"
 
 start() {
-	if [ ! -d /proc/virtual ]; then
-		show "Fixing vservers /proc entries visibility. kernel not capable"
-		fail
-		exit 1
-	fi
-
 	show "Fixing vservers /proc entries visibility"
 	busy
 	${_SETATTR} -Rx --hide /proc
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/vprocunhide.init?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list