Commit 9b3dfc1b authored by Eric Cano's avatar Eric Cano
Browse files

Added pre/post install scripts for systemd.

This should remove the need to call systemctl daemon-reload after package update.
Scriptlets found here: https://fedoraproject.org/wiki/Packaging:Scriptlets
parent 6eaeef82
...@@ -57,6 +57,8 @@ BuildRequires: libattr-devel >= 2.4.44 ...@@ -57,6 +57,8 @@ BuildRequires: libattr-devel >= 2.4.44
BuildRequires: oracle-instantclient12.2-devel BuildRequires: oracle-instantclient12.2-devel
BuildRequires: valgrind BuildRequires: valgrind
BuildRequires: valgrind-devel BuildRequires: valgrind-devel
%{?systemd_requires}
BuildRequires: systemd
%endif %endif
# only build debug info if you're building the whole code # only build debug info if you're building the whole code
...@@ -142,6 +144,15 @@ The tape server daemon ...@@ -142,6 +144,15 @@ The tape server daemon
%attr(0644,root,root) /etc/sysconfig/cta-taped %attr(0644,root,root) /etc/sysconfig/cta-taped
%attr(0644,root,root) /etc/systemd/system/cta-taped.service %attr(0644,root,root) /etc/systemd/system/cta-taped.service
%post -n cta-taped
%systemd_post cta-taped.service
%preun -n cta-taped
%systemd_preun cta-taped.service
%postun -n cta-taped
%systemd_postun cta-taped.service
%package -n cta-frontend %package -n cta-frontend
Summary: CERN Tape Archive: Xrootd plugin Summary: CERN Tape Archive: Xrootd plugin
Group: Application/CTA Group: Application/CTA
...@@ -165,8 +176,16 @@ The xroot plugin ...@@ -165,8 +176,16 @@ The xroot plugin
%attr(0644,cta,cta) /etc/systemd/system/cta-frontend.service %attr(0644,cta,cta) /etc/systemd/system/cta-frontend.service
#Frontend installs libraries so we need ldconfig. #Frontend installs libraries so we need ldconfig.
%post -n cta-frontend -p /sbin/ldconfig %post -n cta-frontend
%postun -n cta-frontend -p /sbin/ldconfig /sbin/ldconfig
%systemd_post cta-frontend.service
%preun -n cta-frontend
%systemd_preun cta-frontend.service
%postun -n cta-frontend
/sbin/ldconfig
%systemd_post cta-frontend.service
%package -n cta-cli %package -n cta-cli
Summary: CERN Tape Archive: command line interface Summary: CERN Tape Archive: command line interface
...@@ -316,6 +335,15 @@ Tools to faciliate working with rmcd and smc in cta ...@@ -316,6 +335,15 @@ Tools to faciliate working with rmcd and smc in cta
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/cta-rmcd %attr(0644,root,root) %config(noreplace) /etc/sysconfig/cta-rmcd
%attr(0644,root,root) /etc/systemd/system/cta-rmcd.service %attr(0644,root,root) /etc/systemd/system/cta-rmcd.service
%post -n cta-rmcd
%systemd_post cta-rmcd.service
%preun -n cta-rmcd
%systemd_preun cta-rmcd.service
%postun -n cta-rmcd
%systemd_postun cta-rmcd.service
%package -n cta-tape-developer-acs-tools %package -n cta-tape-developer-acs-tools
Summary: Cern Advanced mass STORage Summary: Cern Advanced mass STORage
Group: Application/Castor Group: Application/Castor
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment