SPECS: VirtualBox.spec - register/unregister virtualbox service on...

hawk hawk at pld-linux.org
Sun Feb 10 21:06:03 CET 2008


Author: hawk                         Date: Sun Feb 10 20:06:03 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- register/unregister virtualbox service on (un)installation

---- Files affected:
SPECS:
   VirtualBox.spec (1.57 -> 1.58) 

---- Diffs:

================================================================
Index: SPECS/VirtualBox.spec
diff -u SPECS/VirtualBox.spec:1.57 SPECS/VirtualBox.spec:1.58
--- SPECS/VirtualBox.spec:1.57	Mon Feb  4 20:16:07 2008
+++ SPECS/VirtualBox.spec	Sun Feb 10 21:05:58 2008
@@ -71,6 +71,7 @@
 BuildRequires:	libstdc++-multilib-devel
 # TODO: How to add glibc-devel.i686 here ?
 %endif
+Requires(post,preun):	/sbin/chkconfig
 Requires(postun):	/usr/sbin/groupdel
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
@@ -361,6 +362,16 @@
 %pre
 %groupadd -g 221 -r -f vbox
 
+%post
+/sbin/chkconfig --add virtualbox
+%service virtualbox restart "VirtualBox"
+
+%preun
+if [ "$1" = "0" ]; then
+	%service virtualbox stop
+	/sbin/chkconfig --del virtualbox
+fi
+
 %postun
 if [ "$1" = "0" ]; then
 	%groupremove vbox
@@ -473,6 +484,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.58  2008-02-10 20:05:58  hawk
+- register/unregister virtualbox service on (un)installation
+
 Revision 1.57  2008-02-04 19:16:07  qboosh
 - typo
 - -udev belongs to userspace
================================================================

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



More information about the pld-cvs-commit mailing list