2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Remove non-root for older distributions

Older systemd does not support capabilities.  For such a platform,
disable non-root mode.
This commit is contained in:
Jarrod Johnson 2020-02-12 13:20:08 -05:00
parent 9879a83a10
commit 6a12af1242

View File

@ -46,6 +46,8 @@ grep -v confluent/__init__.py INSTALLED_FILES.bare | grep -v etc/init.d/confluen
rm $RPM_BUILD_ROOT/etc/init.d/confluent
rmdir $RPM_BUILD_ROOT/etc/init.d
rmdir $RPM_BUILD_ROOT/etc
# Only do non-root confluent if systemd of the platform supports it
systemd-analyze verify $RPM_BUILD_ROOT/usr/lib/systemd/system/confluent.service 2>&1 | grep "'AmbientCapabilities'" > /dev/null && sed -e 's/User=.*//' -e 's/Group=.*//' -e 's/AmbientCapabilities=.*//' -i $RPM_BUILD_ROOT/usr/lib/systemd/system/confluent.service
cat INSTALLED_FILES
%triggerin -- python-pyghmi, python3-pyghmi, python2-pyghmi