From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 20 11:50:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C121065673 for ; Fri, 20 Mar 2009 11:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3FE8FC19 for ; Fri, 20 Mar 2009 11:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KBo1Ki048414 for ; Fri, 20 Mar 2009 11:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2KBo1N9048413; Fri, 20 Mar 2009 11:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 20 Mar 2009 11:50:01 GMT Resent-Message-Id: <200903201150.n2KBo1N9048413@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugen Konkov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B104E1065686 for ; Fri, 20 Mar 2009 11:40:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 9D35F8FC2A for ; Fri, 20 Mar 2009 11:40:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KBe0sk017129 for ; Fri, 20 Mar 2009 11:40:00 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n2KBdxJH017128; Fri, 20 Mar 2009 11:39:59 GMT (envelope-from nobody) Message-Id: <200903201139.n2KBdxJH017128@www.freebsd.org> Date: Fri, 20 Mar 2009 11:39:59 GMT From: Eugen Konkov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/132851: patch to allow to setup fib for service running from rc.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 11:50:01 -0000 >Number: 132851 >Category: misc >Synopsis: patch to allow to setup fib for service running from rc.conf >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Mar 20 11:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eugen Konkov >Release: 7.1-RELEASE >Organization: ISP Konkov >Environment: FreeBSD kes.net.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Sat Jan 3 01:15:39 EET 2009 kes@kes.net.ua:/usr/obj/usr/src/sys/KES_KERN_v7 i386 >Description: patch to allow to setup fib for service running from rc.conf /etc/rc.conf # setup the full command to run # +++ _fib= +++ if [ "${name}_fib" ]; then +++ eval _fib=\$${name}_fib +++ _fib="/usr/sbin/setfib $_fib" +++ fi echo "Starting ${name}." if [ -n "$_chroot" ]; then _doit="\ ${_nice:+nice -n $_nice }\ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ ---$_chroot $command $rc_flags $command_args" +++$_chroot $_fib $command $rc_flags $command_args" else _doit="\ ${_chdir:+cd $_chdir && }\ --- $command $rc_flags $command_args" +++ $_fib $command $rc_flags $command_args" >How-To-Repeat: Example /etc/rc.conf smtp_gated_enable="YES" smtp_gated_fib="3" Apache has its own implementation: see /usr/local/etc/rc.d/apache22 # apache22_fib (str): Set an altered default network view for apache But mine is centalized. >Fix: >Release-Note: >Audit-Trail: >Unformatted: