SHA256
1
0
forked from pool/squid

- Move update logic to proper scriptlet

* Replace 'etc' with %{_sysconfdir} macro

OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=84
This commit is contained in:
Jochen Keil 2015-08-10 12:29:31 +00:00 committed by Git OBS Bridge
parent 1bb7ead10c
commit 8507b0836c
2 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Aug 10 12:26:30 UTC 2015 - jkeil@suse.de
- Move update logic to proper scriptlet
* Replace 'etc' with %{_sysconfdir} macro
-------------------------------------------------------------------
Wed Aug 5 21:20:28 UTC 2015 - chris@computersalat.de

View File

@ -1,7 +1,7 @@
#
# spec file for package squid
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -312,6 +312,16 @@ if [ -e etc/%{name}/%{name}.conf ]; then
sed -i '/emulate_httpd_log/d' /etc/%{name}/%{name}.conf
fi
# update mode?
if [ "$1" -gt "1" ]; then
if [ -e %{_sysconfdir}/%{name}.conf -a ! -L %{_sysconfdir}/%{name}.conf -a ! -e %{_sysconfdir}/%{name}/%{name}.conf ]; then
echo "moving %{_sysconfdir}/%{name}.conf to %{_sysconfdir}/%{name}/%{name}.conf"
mv /%{_sysconfdir}/%{name}.conf /%{_sysconfdir}/%{name}/%{name}.conf
fi
# default group changed from nogroup to squid
%{_sbindir}/usermod -g %{name} %{name}
fi
%if 0%{?has_systemd}
%service_add_pre %{name}.service
%endif
@ -327,15 +337,6 @@ fi
%run_permissions
%endif
%endif
# update mode?
if [ "$1" -gt "1" ]; then
if [ -e etc/%{name}.conf -a ! -L etc/%{name}.conf -a ! -e etc/%{name}/%{name}.conf ]; then
echo "moving %{_sysconfdir}/%{name}.conf to %{_sysconfdir}/%{name}/%{name}.conf"
mv /etc/%{name}.conf /etc/%{name}/%{name}.conf
fi
# default group changed from nogroup to squid
%{_sbindir}/usermod -g %{name} %{name}
fi
%if 0%{?has_systemd}
%service_add_post squid.service