SOURCES: fbset.init - exit early if not configured

glen glen at pld-linux.org
Thu Dec 7 19:18:34 CET 2006


Author: glen                         Date: Thu Dec  7 18:18:34 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- exit early if not configured

---- Files affected:
SOURCES:
   fbset.init (1.29 -> 1.30) 

---- Diffs:

================================================================
Index: SOURCES/fbset.init
diff -u SOURCES/fbset.init:1.29 SOURCES/fbset.init:1.30
--- SOURCES/fbset.init:1.29	Thu Dec  7 19:16:53 2006
+++ SOURCES/fbset.init	Thu Dec  7 19:18:29 2006
@@ -10,22 +10,17 @@
 #
 # config:	/etc/sysconfig/fbset
 
-# Source function library
-. /etc/rc.d/init.d/functions
-
 # Get service config
 if [ -f /etc/sysconfig/fbset ]; then
 	. /etc/sysconfig/fbset
 fi
 
-function try_load
-{
-	if [ -n "${FBMODULE}" ]; then
-		_modprobe single $FBMODULE
-	else
-		exit 0
-	fi
-}
+if [ -z "${FBMODULE}" ]; then
+	exit 0
+fi
+
+# Source function library
+. /etc/rc.d/init.d/functions
 
 # Setting default depth
 if [ -n "${DEPTH}" ]; then
@@ -43,10 +38,10 @@
 		# Check if we have framebuffer in kernel.
 		if [ -f /proc/fb ]; then
 			# /proc files show as files with size=0, this is a workaround.
-			cat /proc/fb | grep -q "." || try_load
+			cat /proc/fb | grep -q "." || modprobe single $FBMODULE
 		else
 			# if not, then try to load specified kernel module
-			try_load
+			modprobe single $FBMODULE
 		fi
 
 		if [ -n "${FBMODE_default}" ]; then
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/fbset.init?r1=1.29&r2=1.30&f=u



More information about the pld-cvs-commit mailing list