Skip to content

Commit

Permalink
RPM: Move the scriptlets to the xrootd-server package. Fixes #179.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljanyst committed Dec 3, 2014
1 parent 3132161 commit 2ccdf98
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packaging/rhel/xrootd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ rm -rf $RPM_BUILD_ROOT
%post server-libs -p /sbin/ldconfig
%postun server-libs -p /sbin/ldconfig

%pre
%pre server

getent group xrootd >/dev/null || groupadd -r xrootd
getent passwd xrootd >/dev/null || \
Expand All @@ -445,12 +445,12 @@ exit 0

%if %{use_systemd}

%post
%post server
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

%preun
%preun server
if [ $1 -eq 0 ] ; then
for DAEMON in xrootd cmsd frm_purged frm xfrd; do
for INSTANCE in `/usr/bin/systemctl | grep $DAEMON@ | awk '{print $1;}'`; do
Expand All @@ -460,7 +460,7 @@ if [ $1 -eq 0 ] ; then
done
fi

%postun
%postun server
if [ $1 -ge 1 ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
for DAEMON in xrootd cmsd frm_purged frm xfrd; do
Expand All @@ -472,15 +472,15 @@ fi

%else

%post
%post server
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add xrootd
/sbin/chkconfig --add cmsd
/sbin/chkconfig --add frm_purged
/sbin/chkconfig --add frm_xfrd
fi

%preun
%preun server
if [ $1 -eq 0 ]; then
/sbin/service xrootd stop >/dev/null 2>&1 || :
/sbin/service cmsd stop >/dev/null 2>&1 || :
Expand All @@ -492,7 +492,7 @@ if [ $1 -eq 0 ]; then
/sbin/chkconfig --del frm_xfrd
fi

%postun
%postun server
if [ $1 -ge 1 ]; then
/sbin/service xrootd condrestart >/dev/null 2>&1 || :
/sbin/service cmsd condrestart >/dev/null 2>&1 || :
Expand Down

0 comments on commit 2ccdf98

Please sign in to comment.