Accepting request 677001 from server:proxy
- Revert whitespace deletions of .changes as it makes diffs a pain. - Do not hide errors from useradd. Make scriptlets plain sh compatible. OBS-URL: https://build.opensuse.org/request/show/677001 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/squid?expand=0&rev=68
This commit is contained in:
commit
142b1d34e9
@ -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 <jengelh@inai.de>
|
||||
|
||||
- Do not hide errors from useradd. Make scriptlets
|
||||
plain sh compatible.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 02 05:45:03 UTC 2019 - sean@suspend.net
|
||||
|
||||
|
21
squid.spec
21
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user