[Resolvconf-devel] Bug#426275: resolvconf: add script to update proxy and other services

Anon Sricharoenchai anon.hui at gmail.com
Mon May 28 09:04:54 UTC 2007


Fix bugs found in /etc/resolvconf/update-proxy.d/squid, the squid example.

diff -durN --exclude={diff} --exclude='resolvconf/{diff}/*'
--exclude='.*.sw?' --exclude='.sw?' --
commit/resolvconf/update-proxy.d/squid resolvconf/update-proxy.d/squid
--- commit/resolvconf/update-proxy.d/squid	2007-05-26 19:50:29.000000000 +0700
+++ resolvconf/update-proxy.d/squid	2007-05-28 11:57:46.000000000 +0700
@@ -63,7 +63,9 @@
    ++$cache_peer{lc($host)}{$port+0};
 }

-$init = 0; scalar(@ARGV) > 0 and shift(@ARGV) eq "-i" and $init = 1;
+$init = 0; if (scalar(@ARGV) > 0 and $ARGV[0] eq "-i") {
+   shift(@ARGV); $init = 1;
+}

 my $new_acl_count = 0;

@@ -89,7 +91,10 @@
 #if ($action eq "+") {
    #$src_file = "$ETCRESOLVCONF/squid-peer-acl/enable-$host";
    $src_file = "$ETCRESOLVCONF/squid/$host-add-peer-acl";
-   $cmd = ""; # leave blank file
+   #$cmd = ""; # leave blank file
+   # From experiment, squid regards empty acl (blank file) as all (always
+   # match).
+   $cmd = "echo 255.255.255.255/255.255.255.255";
 #} elsif ($action eq "-") {
 #   #$src_file = "$ETCRESOLVCONF/squid-peer-acl/disable-$host";
 #   $src_file = "$ETCRESOLVCONF/squid/$host-del-peer-acl";




More information about the Resolvconf-devel mailing list