Commit 3f277dd6 authored by Wolfgang Schweer's avatar Wolfgang Schweer
Browse files

Fix squid configuration now that /etc/default/squid isn't used anymore.

cf3/cf.squid: Link our configuration as /etc/squid/squid.conf, adjust
the squid-update-cachedir call.

share/debian-edu-config/tools/squid-update-cachedir: Stop sourcing
/etc/default/squid, adjust the code to be systemd compliant.
parent c1e1a5d3
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ files:

     # Use Debian Edu configuration file.

    "/etc/squid/squid-debian-edu.conf"
    "/etc/squid/squid.conf"
      link_from => ln_s("/usr/share/debian-edu-config/squid.conf"),
      move_obstructions => "true";

@@ -36,7 +36,7 @@ commands:
  # Update Squid to use all the available space (aka 80% of the partition)

  debian.server.installation::
    "/usr/share/debian-edu-config/tools/squid-update-cachedir /etc/squid/squid-debian-edu.conf"
    "/usr/share/debian-edu-config/tools/squid-update-cachedir /etc/squid/squid.conf"
      contain => in_shell;

}
@@ -46,23 +46,10 @@ bundle agent editline_squid

vars:

  "default" slist => { "CONFIG=/etc/squid/squid-debian-edu.conf",
                       "SQUID_ARGS=\"-YC -f /etc/squid/squid-debian-edu.conf\"" };
  "proxy"  string => "DHCP_WPAD_PROXY_UPDATE=false";
  "allow"  string => "http_access allow localnet";

files:

  debian.server.installation::

    "/etc/default/squid"
      create => "true",
      edit_line => append_if_no_line("$(default)");

    "/etc/squid/conf.d/debian.conf"
      create => "true",
      edit_line => append_if_no_line("$(allow)");

  # Disable the automatic proxy configuration on LTSP boot, as the
  # default setup is already correct and not calling
  # wpad-proxy-update shaves 3 seconds from the boot.
+6 −1
Original line number Diff line number Diff line
@@ -4,7 +4,12 @@ debian-edu-config (2.10.37) UNRELEASED; urgency=medium
    - Remove temporary apt configuration. This reverts the modification done in
      d-e-i/base-installer to get back the default apt behaviour for the
      installed system.
  * cf3/cf.squid: Adjust configuration (set http_access allow localnet).
  * Fix squid configuration now that systemd support has been added to squid
    and /etc/default/squid isn't used anymore:
    - cf3/cf.squid: Link our configuration as /etc/squid/squid.conf, adjust
      the squid-update-cachedir call.
    - share/debian-edu-config/tools/squid-update-cachedir: Stop sourcing
      /etc/default/squid, adjust the code to be systemd compliant.
  * www/index.html.*: Use relative links whenever possible. (Closes: #906467).

 -- Wolfgang Schweer <wschweer@arcor.de>  Wed, 19 Sep 2018 10:17:02 +0200
+3 −5
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ export LC_ALL

CONFIG=/etc/squid/squid.conf

[ ! -f /etc/default/squid ] || . /etc/default/squid

if [ "$1" ] ; then
    squidconf="$1"
else
@@ -46,10 +44,10 @@ else
fi

if $newconf ; then
    if [ -x /usr/sbin/invoke-rc.d ] ; then
	invoke-rc.d squid reload
    if [ -x /usr/sbin/service ] ; then
	service squid reload
    else
	/etc/init.d/squid reload
	systemctl reload squid.service
    fi
else
    echo "info: Squid configuration not changed"