git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uninstall to stop/unregister running services
[sfa.git]
/
sfa.spec
diff --git
a/sfa.spec
b/sfa.spec
index
06298ab
..
e956532
100644
(file)
--- a/
sfa.spec
+++ b/
sfa.spec
@@
-147,18
+147,33
@@
rm -rf $RPM_BUILD_ROOT
%files sfatables
%{_bindir}/sfatables
%files sfatables
%{_bindir}/sfatables
-%pre plc
-[ -f %{_sysconfdir}/init.d/sfa ] && service sfa stop ||:
-
-%pre cm
-[ -f %{_sysconfdir}/init.d/sfa-cm ] && service sfa-cm stop ||:
-
+### sfa-plc installs the 'sfa' service
%post plc
chkconfig --add sfa
%post plc
chkconfig --add sfa
+%preun plc
+if [ "$1" = 0 ] ; then
+ /sbin/service sfa stop
+ /sbin/chkconfig --del sfa
+fi
+
+%postun plc
+[ "$1" -ge "1" ] && service sfa restart
+
+### sfa-cm installs the 'sfa-cm' service
%post cm
chkconfig --add sfa-cm
%post cm
chkconfig --add sfa-cm
+%preun cm
+if [ "$1" = 0 ] ; then
+ /sbin/service sfa-cm stop
+ /sbin/chkconfig --del sfa-cm
+fi
+
+%postun cm
+[ "$1" -ge "1" ] && service sfa-cm restart
+
+
%changelog
* Tue Sep 07 2010 Tony Mack <tmack@cs.princeton.edu> - sfa-0.9-16
- truncate login base of external (ProtoGeni, etc) slices to 20 characters
%changelog
* Tue Sep 07 2010 Tony Mack <tmack@cs.princeton.edu> - sfa-0.9-16
- truncate login base of external (ProtoGeni, etc) slices to 20 characters