[packages/tigervnc: 2/3] - chkconfig in post/preun for server

hawk hawk at pld-linux.org
Sun Jul 21 20:40:38 CEST 2013


commit 2dcb35110cb971bad85f2a9003d09c9579a1386e
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Sun Jul 21 18:52:54 2013 +0000

    - chkconfig in post/preun for server

 tigervnc.spec | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/tigervnc.spec b/tigervnc.spec
index 867ca4a..0104689 100644
--- a/tigervnc.spec
+++ b/tigervnc.spec
@@ -119,6 +119,7 @@ gałęzi VNC 4 TightVNC.
 Summary:	VNC X server - TigerVNC version
 Summary(pl.UTF-8):	X serwer VNC - wersja TigerVNC
 Group:		X11/Applications/Networking
+Requires(post,preun):	/sbin/chkconfig
 Requires:	xorg-app-rgb
 # for vncpasswd tool
 Requires:	%{name}-utils = %{version}-%{release}
@@ -279,6 +280,16 @@ rm -rf $RPM_BUILD_ROOT
 [ ! -x /usr/bin/update-desktop-database ] || %update_desktop_database_postun
 %update_icon_cache hicolor
 
+%post server
+/sbin/chkconfig --add vncserver
+%service vncserver restart "VNC server"
+
+%preun server
+if [ "$1" = "0" ]; then
+	%service vncserver stop
+	/sbin/chkconfig --del vncserver
+fi
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc doc/*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tigervnc.git/commitdiff/b05eeac8c634fbf5443d4ca2881c44ff4c9534a6



More information about the pld-cvs-commit mailing list