Skip to content
Snippets Groups Projects
Commit 631bfedd authored by Anastasia Karachaliou's avatar Anastasia Karachaliou
Browse files

Replaced getent with grep of /etc/passwd to avoid LDAP

parent 2d199f7a
No related branches found
No related tags found
No related merge requests found
Pipeline #32515 failed
...@@ -106,12 +106,12 @@ Summary: CERN Tape Archive: tape daemon ...@@ -106,12 +106,12 @@ Summary: CERN Tape Archive: tape daemon
Group: Application/CTA Group: Application/CTA
Requires: logrotate Requires: logrotate
Requires: cta-lib = %{version}-%{release} Requires: cta-lib = %{version}-%{release}
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/luseradd Requires(pre): /usr/bin/egrep, /usr/sbin/groupadd, /usr/sbin/luseradd
%description -n cta-taped %description -n cta-taped
CERN Tape Archive: CERN Tape Archive:
The tape server daemon The tape server daemon
%pre -n cta-taped %pre -n cta-taped
/usr/bin/getent passwd cta || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta /usr/bin/egrep -q '^cta:' /etc/passwd || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta
%files -n cta-taped %files -n cta-taped
%defattr(-,root,root) %defattr(-,root,root)
%attr(0755,cta,tape) %dir /var/log/cta %attr(0755,cta,tape) %dir /var/log/cta
...@@ -140,12 +140,12 @@ Group: Application/CTA ...@@ -140,12 +140,12 @@ Group: Application/CTA
Requires: logrotate Requires: logrotate
Requires: cta-lib = %{version}-%{release} Requires: cta-lib = %{version}-%{release}
Requires: xrootd-server Requires: xrootd-server
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/luseradd Requires(pre): /usr/bin/egrep, /usr/sbin/groupadd, /usr/sbin/luseradd
%description -n cta-frontend %description -n cta-frontend
CERN Tape Archive: CERN Tape Archive:
The xroot plugin The xroot plugin
%pre -n cta-frontend %pre -n cta-frontend
/usr/bin/getent passwd cta || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta /usr/bin/egrep -q '^cta:' /etc/passwd || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta
%files -n cta-frontend %files -n cta-frontend
%defattr(0755,root,root) %defattr(0755,root,root)
%{_libdir}/libXrdSsiCta.so* %{_libdir}/libXrdSsiCta.so*
...@@ -300,12 +300,12 @@ Summary: Tools to faciliate working with acsd in cta ...@@ -300,12 +300,12 @@ Summary: Tools to faciliate working with acsd in cta
Group: Application/CTA Group: Application/CTA
Requires: logrotate Requires: logrotate
#Requires: cta-lib = %{version}-%{release} #Requires: cta-lib = %{version}-%{release}
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/luseradd Requires(pre): /usr/bin/egrep, /usr/sbin/groupadd, /usr/sbin/luseradd
%description -n cta-acsd %description -n cta-acsd
CERN Tape Archive: CERN Tape Archive:
Tools to faciliate working with acsd in cta Tools to faciliate working with acsd in cta
%pre -n cta-acsd %pre -n cta-acsd
/usr/bin/getent passwd cta || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta /usr/bin/egrep -q '^cta:' /etc/passwd || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta
%files -n cta-acsd %files -n cta-acsd
%defattr(-,root,root) %defattr(-,root,root)
%attr(0755,cta,tape) %dir /var/log/cta %attr(0755,cta,tape) %dir /var/log/cta
...@@ -332,12 +332,12 @@ Summary: Tools to faciliate working with rmcd and smc in cta ...@@ -332,12 +332,12 @@ Summary: Tools to faciliate working with rmcd and smc in cta
Group: Application/CTA Group: Application/CTA
Requires: logrotate Requires: logrotate
#Requires: cta-lib = %{version}-%{release} #Requires: cta-lib = %{version}-%{release}
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/luseradd Requires(pre): /usr/bin/egrep, /usr/sbin/groupadd, /usr/sbin/luseradd
%description -n cta-rmcd %description -n cta-rmcd
CERN Tape Archive: CERN Tape Archive:
Tools to faciliate working with rmcd and smc in cta Tools to faciliate working with rmcd and smc in cta
%pre -n cta-rmcd %pre -n cta-rmcd
/usr/bin/getent passwd cta || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta /usr/bin/egrep -q '^cta:' /etc/passwd || /usr/sbin/luseradd -s /bin/nologin -c "CTA system account" -g tape cta
%files -n cta-rmcd %files -n cta-rmcd
%defattr(-,root,root) %defattr(-,root,root)
%attr(0755,cta,tape) %dir /var/log/cta %attr(0755,cta,tape) %dir /var/log/cta
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment