Re: [squid-users] Fw: [ERROR] commonUfsDirOpenSwapLog: Failed to open swap log

From: Warren Baker <>
Date: Mon, 23 Jul 2012 14:08:05 +0200

On Mon, Jul 23, 2012 at 12:51 PM, Anonymous <> wrote:
> Send the contents (sanitized if needed) of your /etc/rc.conf
> hostname="test"
> sshd_enable="YES"
> powerd_enable="YES"
> # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
> dumpdev="NO"
> pdnsd_enable="YES"
> apache22_enable="YES"
> #squid_enable="YES"

Uncomment this

> #/usr/local/sbin/squid
> /usr/local/etc/rc.d/

Remove this ^^^

> *******************************************
> ls /usr/local/etc/rc.d/
> apache22 htcacheclean
> pdnsd webmin

How did you install Squid? Ahh..looking further back in the thread I
see you have a 3.2 version for which there is no port yet.
So in that case you can either amend your file to include
rc.subr and add the appropriate checks or use another squid startup
file and modify it to suit your needs.

Squid3.1 port startup file below, but should work fine for your install:

# $FreeBSD: ports/www/squid31/files/,v 1.10 2011/08/31
21:09:18 flo Exp $
# PROVIDE: squid
# KEYWORD: shutdown
# Note:
# Set "squid_enable=yes" in either /etc/rc.conf, /etc/rc.conf.local or
# /etc/rc.conf.d/squid to activate Squid.
# Additional variables you can define in one of these files:
# squid_chdir: the directory into which the rc system moves into before
# starting Squid. Default: /var/squid
# squid_conf: The configuration file that Squid should use.
# Default: /usr/local/etc/squid/squid.conf
# squid_fib: The alternative routing table id that Squid should use.
# Default: none
# See setfib(1) for further details. Note that the setfib(2)
# system call is not available in FreeBSD versions prior to 7.1.
# squid_user: The user id that should be used to run the Squid master
# process. Default: squid.
# Note that you probably need to define "squid_user=root" if
# you want to run Squid in reverse proxy setups or if you want
# Squid to listen on a "privileged" port < 1024.
# squid_pidfile:
# The name (including the full path) of the Squid
# master process' PID file.
# Default: /var/run/squid/
# You only need to change this if you changed the
# corresponding entry in your Squid configuration.
# squid_flags: Additional commandline arguments for Squid you might want to
# use. See squid(8) for further details.

squid_checkrunning() {
        ${command} ${command_args} ${squid_flags} -k check 2>/dev/null

squid_setfib() {
        sysctl net.fibs >/dev/null 2>&1 || return 0
        if [ "x${squid_fib}" != "xNONE" ]; then
                command="setfib -F ${squid_fib} ${command}"
                return 0

squid_stop() {
        echo "Stopping ${name}."
        ${command} ${command_args} ${squid_flags} -k shutdown
        run_rc_command poll

. /etc/rc.subr

reload_cmd="${command} ${command_args} ${squid_flags} -k reconfigure"

load_rc_config ${name}



# squid(8) will not start if ${squid_conf} is not present so try
# to catch that beforehand via ${required_files} rather than make
# squid(8) crash.


# Now make sure that we invoke squid with "-f ${squid_conf}":

command_args="-f ${squid_conf}"

run_rc_command "$1"

# Eof

Received on Mon Jul 23 2012 - 12:08:19 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 23 2012 - 12:00:02 MDT