From owner-svn-src-all@FreeBSD.ORG Sat Nov 17 14:18:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19DEE920; Sat, 17 Nov 2012 14:18:58 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback8.mail.ru (fallback8.mail.ru [94.100.176.136]) by mx1.freebsd.org (Postfix) with ESMTP id 9424D8FC12; Sat, 17 Nov 2012 14:18:57 +0000 (UTC) Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.176.132]) by fallback8.mail.ru (mPOP.Fallback_MX) with ESMTP id EFF8BD4A362; Sat, 17 Nov 2012 18:16:59 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=7RgstDUSzFQUWkRck5ELrL9JQ3sUJIzpdjiUpfr8Ixc=; b=YZz6in6e0pAFQ0nOqfjozn+Xno7vvB11rsGHc/W7CXdPNgdA7b1eBhkKbNf7rzdHFu/Fx9bwcbgPPlnem6igS54LaP/dvoHaKjYjuBM0nBEv9yqkRqDvtxj8g8p7BSJF; Received: from [93.185.182.46] (port=5836 helo=gpr.nnz-home.ru) by smtp5.mail.ru with esmtpa (envelope-from ) id 1TZjCV-00020Z-FT; Sat, 17 Nov 2012 18:16:51 +0400 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1TZjCO-0000GV-Fc; Sat, 17 Nov 2012 18:16:44 +0400 Date: Sat, 17 Nov 2012 18:16:44 +0400 From: Gennady Proskurin To: Hiroki Sato Subject: Re: svn commit: r242184 - in head: etc share/man/man5 Message-ID: <20121117141644.GA923@gpr.nnz-home.ru> References: <201210271909.q9RJ99fi039297@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210271909.q9RJ99fi039297@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam: Not detected X-Mras: Ok Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 14:18:58 -0000 Now squid startup script is unable to start squid # pkg info -x ^squid squid-3.2.3_1 HTTP Caching Proxy # sysctl net.fibs net.fibs: 1 # grep squid /etc/rc.conf squid_enable="YES" squid_pidfile="/var/squid/squid.pid" squid_chdir="/var/squid" # /usr/local/etc/rc.d/squid start Starting squid. setfib: NONE: invalid FIB (max 0) Exit 1 /usr/local/etc/rc.d/squid: WARNING: failed to start squid Exit 1 # sh -x /usr/local/etc/rc.d/squid start ... [skip] ... + debug 'run_rc_command: start_precmd: squid_setfib ' + eval 'squid_setfib ' + squid_setfib + sysctl net.fibs + [ xNONE != xNONE ] + return 0 + _return=0 + [ 0 -ne 0 ] + check_required_after start + local _f _args + return 0 + return 0 + check_startmsgs + [ -n '' ] + return 0 + echo 'Starting squid.' Starting squid. + [ -n '' ] + _doit='cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf' + [ -n squid ] + _doit='su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + [ -n '' ] + _run_rc_doit 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + debug 'run_rc_command: doit: su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + eval 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + su -m squid -c 'sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"' setfib: NONE: invalid FIB (max 0) Exit 1 + _return=1 + [ 1 -ne 0 ] + [ -z '' ] + return 1 + warn 'failed to start squid' + [ -x /usr/bin/logger ] + logger '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' + echo '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' /usr/local/etc/rc.d/squid: WARNING: failed to start squid + return 1 Exit 1 On Sat, Oct 27, 2012 at 07:09:09PM +0000, Hiroki Sato wrote: > Author: hrs > Date: Sat Oct 27 19:09:09 2012 > New Revision: 242184 > URL: http://svn.freebsd.org/changeset/base/242184 > > Log: > Add setfib(1) support for services as _fib in rc.conf. > > Modified: > head/etc/rc.subr > head/share/man/man5/rc.conf.5 > > Modified: head/etc/rc.subr > ============================================================================== > --- head/etc/rc.subr Sat Oct 27 17:43:30 2012 (r242183) > +++ head/etc/rc.subr Sat Oct 27 19:09:09 2012 (r242184) > @@ -462,6 +462,8 @@ check_startmsgs() > # NOTE: $flags from the parent environment > # can be used to override this. > # > +# ${name}_fib n Routing table number to run ${command} with. > +# > # ${name}_nice n Nice level to run ${command} at. > # > # ${name}_user n User to run ${command} as, using su(1) if not > @@ -640,7 +642,8 @@ run_rc_command() > fi > eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ > _nice=\$${name}_nice _user=\$${name}_user \ > - _group=\$${name}_group _groups=\$${name}_groups > + _group=\$${name}_group _groups=\$${name}_groups \ > + _fib=\$${name}_fib > > if [ -n "$_user" ]; then # unset $_user if running as that user > if [ "$_user" = "$(eval $IDCMD)" ]; then > @@ -721,11 +724,13 @@ run_rc_command() > if [ -n "$_chroot" ]; then > _doit="\ > ${_nice:+nice -n $_nice }\ > +${_fib:+setfib -F $_fib }\ > chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ > $_chroot $command $rc_flags $command_args" > else > _doit="\ > ${_chdir:+cd $_chdir && }\ > +${_fib:+setfib -F $_fib }\ > $command $rc_flags $command_args" > if [ -n "$_user" ]; then > _doit="su -m $_user -c 'sh -c \"$_doit\"'" > > Modified: head/share/man/man5/rc.conf.5 > ============================================================================== > --- head/share/man/man5/rc.conf.5 Sat Oct 27 17:43:30 2012 (r242183) > +++ head/share/man/man5/rc.conf.5 Sat Oct 27 19:09:09 2012 (r242184) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 22, 2012 > +.Dd October 27, 2012 > .Dt RC.CONF 5 > .Os > .Sh NAME > @@ -179,6 +179,11 @@ Run the service under this user account. > .Pq Vt str > Run the chrooted service under this system group. Unlike the _user > setting, this setting has no effect if the service is not chrooted. > +.It Ao Ar name Ac Ns Va _fib > +.Pq Vt int > +The > +.Xr setfib 1 > +value to run the service under. > .It Ao Ar name Ac Ns Va _nice > .Pq Vt int > The > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >