conf/97109: /etc/rc.d/jail gives an ifconfig error if jail_example_interface is not defined

Dan Olson danolson at visi.com
Wed May 10 22:40:26 UTC 2006


>Number:         97109
>Category:       conf
>Synopsis:       /etc/rc.d/jail gives an ifconfig error if jail_example_interface is not defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 10 22:40:23 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Dan Olson
>Release:        6.1-Stable
>Organization:
>Environment:
FreeBSD maxwell.danolson.dsl.visi.com 6.1-STABLE FreeBSD 6.1-STABLE #0: Tue May  9 16:59:48 CDT 2006     olson at maxwell.danolson.dsl.visi.com:/usr/obj/usr/src/sys/MAXWELL  i386

>Description:
After upgrading my system, the jail start script started giving errors like:

when executing /etc/rc.d/jail stop jailname

ifconfig: illegal option -- i

when executing /etc/rc.d/jail start jailname

ifconfig: interface alias does not exist

Upon examining the /etc/rc.d/jail script I found that lines 167 and 242 always evauluate to true no matter what $jail_interface is set to, even if it is not set.


>How-To-Repeat:
Run /etc/rc.d/jail start|stop jailname and not have $jail_jailname_interface set in /etc/rc.conf.
>Fix:
Change lines 167 and 242 from:

if [ -n ${jail_interface} ]; then

to

if [ -n "${jail_interface}" ]; then
 
This will cause the test to be evaluated as intended.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list