Commit 90f8ec7b authored by Michał Kępień's avatar Michał Kępień
Browse files

Use getent in the pre-installation scriptlet

parent 3559a4b7
......@@ -356,10 +356,8 @@ echo "d %{_localstatedir}/run/named 0770 named named -" > ${RPM_BUILD_ROOT}%{_tm
if [ "$1" -eq 1 ]; then
# Initial installation, not upgrade
groupadd -f -r named
if ! cut -d: -f1 /etc/passwd | grep -F -x -q named; then
useradd -c named -d %{_localstatedir}/named -g named -r -s /sbin/nologin named
getent group named >/dev/null 2>&1 || groupadd -f -r named
getent passwd named >/dev/null 2>&1 || useradd -c named -d %{_localstatedir}/named -g named -r -s /sbin/nologin named
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