diff --git a/squid.changes b/squid.changes index 8dc0539..a4a6f1f 100644 --- a/squid.changes +++ b/squid.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Feb 18 10:03:23 UTC 2019 - adam.majer@suse.de + +- Revert whitespace deletions of .changes as it makes diffs a pain. + +------------------------------------------------------------------- +Sat Feb 16 00:19:25 UTC 2019 - Jan Engelhardt + +- Do not hide errors from useradd. Make scriptlets + plain sh compatible. + ------------------------------------------------------------------- Wed Jan 02 05:45:03 UTC 2019 - sean@suspend.net diff --git a/squid.spec b/squid.spec index a6bf63f..d80f70f 100644 --- a/squid.spec +++ b/squid.spec @@ -197,26 +197,21 @@ make %{?_smp_mflags} check %pre # we need this group for /usr/sbin/pinger -if [[ -z $(%{_bindir}/getent group %{name} 2>/dev/null) ]]; then - %{_sbindir}/groupadd -g 31 -r %{name} 2>/dev/null -fi +getent group %{name} >/dev/null || %{_sbindir}/groupadd -g 31 -r %{name} # we need this group for squid (ntlmauth) # read access to /var/lib/samba/winbindd_privileged -if [[ -z $(%{_bindir}/getent group winbind 2>/dev/null) ]]; then - %{_sbindir}/groupadd -r winbind 2>/dev/null -fi -if [[ -z $(%{_bindir}/getent passwd squid 2>/dev/null) ]]; then +getent group winbind >/dev/null || %{_sbindir}/groupadd -r winbind +getent passwd squid >/dev/null || \ %{_sbindir}/useradd -c "WWW-proxy squid" -d %{_localstatedir}/cache/%{name} \ -G winbind -g %{name} -o -u 31 -r -s /bin/false \ - %{name} 2>/dev/null -fi + %{name} # if default group is not squid, change it -if [[ "$(%{_bindir}/id -ng %{name} 2>/dev/null)" != "%{name}" ]]; then - %{_sbindir}/usermod -g %{name} %{name} 2>/dev/null +if [ "$(%{_bindir}/id -ng %{name} 2>/dev/null)" != "%{name}" ]; then + %{_sbindir}/usermod -g %{name} %{name} fi # if squid is not member of winbind, add him -if [[ $(%{_bindir}/id -nG %{name} 2>/dev/null | grep -q winbind >/dev/null; echo $?) -ne 0 ]]; then - %{_sbindir}/usermod -G winbind %{name} 2>/dev/null +if [ $(%{_bindir}/id -nG %{name} 2>/dev/null | grep -q winbind; echo $?) -ne 0 ]; then + %{_sbindir}/usermod -G winbind %{name} fi %service_add_pre %{name}.service