Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 2009 11:39:59 GMT
From:      Eugen Konkov <kes-kes@yandex.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/132851: patch to allow to setup fib for service running from rc.conf
Message-ID:  <200903201139.n2KBdxJH017128@www.freebsd.org>
Resent-Message-ID: <200903201150.n2KBo1N9048413@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201139.n2KBdxJH017128>