SPECS: VirtualBox.spec - fixed post/preun for kernel drivers init scripts

hawk hawk at pld-linux.org
Mon May 26 08:57:44 CEST 2008


Author: hawk                         Date: Mon May 26 06:57:44 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fixed post/preun for kernel drivers init scripts

---- Files affected:
SPECS:
   VirtualBox.spec (1.86 -> 1.87) 

---- Diffs:

================================================================
Index: SPECS/VirtualBox.spec
diff -u SPECS/VirtualBox.spec:1.86 SPECS/VirtualBox.spec:1.87
--- SPECS/VirtualBox.spec:1.86	Sat May 17 14:38:59 2008
+++ SPECS/VirtualBox.spec	Mon May 26 08:57:39 2008
@@ -12,7 +12,7 @@
 %bcond_without	kernel		# don't build kernel module
 %bcond_without	userspace	# don't build userspace package
 
-%define		rel		3
+%define		rel		4
 
 %if %{without kernel}
 %undefine	with_dist_kernel
@@ -357,16 +357,6 @@
 %pre
 %groupadd -g 221 -r -f vbox
 
-%post
-/sbin/chkconfig --add virtualbox
-%service virtualbox restart "VirtualBox OSE"
-
-%preun
-if [ "$1" = "0" ]; then
-	%service virtualbox stop
-	/sbin/chkconfig --del virtualbox
-fi
-
 %postun
 if [ "$1" = "0" ]; then
 	%groupremove vbox
@@ -374,16 +364,32 @@
 
 %post	-n kernel%{_alt_kernel}-misc-vboxadd
 %depmod %{_kernel_ver}
+/sbin/chkconfig --add vboxadd
+%service vboxadd restart "VirtualBox OSE guest additions driver"
 
 %postun	-n kernel%{_alt_kernel}-misc-vboxadd
 %depmod %{_kernel_ver}
 
+%preun -n kernel%{_alt_kernel}-misc-vboxadd
+if [ "$1" = "0" ]; then
+	%service vboxadd stop
+	/sbin/chkconfig --del vboxadd
+fi
+
 %post	-n kernel%{_alt_kernel}-misc-vboxdrv
 %depmod %{_kernel_ver}
+/sbin/chkconfig --add vboxdrv
+%service vboxdrv restart "VirtualBox OSE driver"
 
 %postun	-n kernel%{_alt_kernel}-misc-vboxdrv
 %depmod %{_kernel_ver}
 
+%preun -n kernel%{_alt_kernel}-misc-vboxdrv
+if [ "$1" = "0" ]; then
+	%service vboxdrv stop
+	/sbin/chkconfig --del vboxdrv
+fi
+
 %post	-n kernel%{_alt_kernel}-misc-vboxvfs
 %depmod %{_kernel_ver}
 
@@ -485,6 +491,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.87  2008-05-26 06:57:39  hawk
+- fixed post/preun for kernel drivers init scripts
+
 Revision 1.86  2008-05-17 12:38:59  pluto
 - fix install.
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/VirtualBox.spec?r1=1.86&r2=1.87&f=u



More information about the pld-cvs-commit mailing list