SOURCES: VirtualBox.init - if sysconfig is loaded, let it do somet...
qboosh
qboosh at pld-linux.org
Tue Jan 29 19:10:35 CET 2008
Author: qboosh Date: Tue Jan 29 18:10:35 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- if sysconfig is loaded, let it do something
- status returns 3 if no module or device
---- Files affected:
SOURCES:
VirtualBox.init (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/VirtualBox.init
diff -u SOURCES/VirtualBox.init:1.1 SOURCES/VirtualBox.init:1.2
--- SOURCES/VirtualBox.init:1.1 Tue Jan 29 14:35:44 2008
+++ SOURCES/VirtualBox.init Tue Jan 29 19:10:30 2008
@@ -12,12 +12,12 @@
# Source function library
. /etc/rc.d/init.d/functions
-# Get service config - may override defaults
-[ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
-
VBOX_DEVICE="/dev/vboxdrv"
VBOX_MODULE="vboxdrv"
+# Get service config - may override defaults
+[ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
+
start() {
modprobe -s $VBOX_MODULE
# set proper /dev/vboxdrv for systems with static dev
@@ -71,13 +71,14 @@
echo "$VBOX_MODULE module is loaded"
else
echo "$VBOX_MODULE module is not loaded"
+ RETVAL=3
fi
if [ ! -c $VBOX_DEVICE ]; then
echo "$VBOX_DEVICE does not exist"
+ RETVAL=3
else
echo "$VBOX_DEVICE exists with major/minor $(ls -l $VBOX_DEVICE | awk '{print $5 $6}')"
fi
- RETVAL=$?
;;
*)
msg_usage "$0 {start|stop|restart|status}"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/VirtualBox.init?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list