[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Fix squid configuration now that /etc/default/squid isn't used anymore.

WolfgangSchweer gitlab at salsa.debian.org
Wed Sep 19 19:30:11 BST 2018


WolfgangSchweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
3f277dd6 by Wolfgang Schweer at 2018-09-19T18:27:58Z
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.

- - - - -


3 changed files:

- cf3/cf.squid
- debian/changelog
- share/debian-edu-config/tools/squid-update-cachedir


Changes:

=====================================
cf3/cf.squid
=====================================
@@ -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.


=====================================
debian/changelog
=====================================
@@ -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 at arcor.de>  Wed, 19 Sep 2018 10:17:02 +0200


=====================================
share/debian-edu-config/tools/squid-update-cachedir
=====================================
@@ -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"



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/3f277dd62a5bd28cde428ffca15ec075791c11d5

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/3f277dd62a5bd28cde428ffca15ec075791c11d5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20180919/fbd82b98/attachment-0001.html>


More information about the debian-edu-commits mailing list