- 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:
parent
1bb7ead10c
commit
8507b0836c
@ -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
|
Wed Aug 5 21:20:28 UTC 2015 - chris@computersalat.de
|
||||||
|
|
||||||
|
21
squid.spec
21
squid.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package squid
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
sed -i '/emulate_httpd_log/d' /etc/%{name}/%{name}.conf
|
||||||
fi
|
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}
|
%if 0%{?has_systemd}
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
%endif
|
%endif
|
||||||
@ -327,15 +337,6 @@ fi
|
|||||||
%run_permissions
|
%run_permissions
|
||||||
%endif
|
%endif
|
||||||
%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}
|
%if 0%{?has_systemd}
|
||||||
%service_add_post squid.service
|
%service_add_post squid.service
|
||||||
|
Loading…
Reference in New Issue
Block a user