From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 6 21:55:03 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 010F7BA for ; Tue, 6 Jan 2015 21:55:02 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2E6166251 for ; Tue, 6 Jan 2015 21:55:02 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t06Lt2oY004047 for ; Tue, 6 Jan 2015 21:55:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196574] Bug in parsing jail.conf Date: Tue, 06 Jan 2015 21:55:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: logik@centrum.cz X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 21:55:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196574 --- Comment #1 from logik@centrum.cz --- The problem is probably on two places: following jail.conf, where no $name redefinition is, leads to errors too: Maybe two substitutions on one line is the problem here? [root@platys ~]# jail -c dhcp epair210a dhcp: created jail: dhcp: /sbin/ifconfig epair210b in192.168.6.210et up: failed dhcp: removed When I replace exec.start += "/sbin/ifconfig epair${ip}b inet $ip_addr up" ; with exec.start += "/sbin/ifconfig epair210b inet $ip_addr up" ; the problem disappear. But two variables on line is not the only problem, because adding (after correcting previous error) new line: $name='dhcp'; throw the error mentioned in my first post: [root@platys ~]# jail -c dhcp epair210a dhcp: created ifconfig: 'vnet' requires argument jail: dhcp: /sbin/ifconfig epair210b vnet: failed dhcp: removed jail.conf: * { exec.start = "/bin/bash /etc/rc"; exec.stop = "/bin/bash /etc/rc.shutdown"; exec.consolelog = "/var/log/jail/$name"; path = "/usr/jails/$name"; mount.fstab = "/etc/jail.fstab/$name"; host.hostname = "$name.dionyska.cz"; devfs_ruleset = "4"; mount.devfs; mount.fdescfs; $ip_addr = "192.168.6.${ip}" ; } dhcp { $ip = "210" ; $ip_route = "192.168.6.1" ; vnet; vnet.interface = "epair${ip}b"; exec.prestart = "ifconfig epair${ip}a destroy 2>/dev/null || true"; exec.prestart += "ifconfig epair$ip create up"; exec.prestart += "ifconfig bridge0 addm epair${ip}a"; exec.start = "/sbin/ifconfig lo0 127.0.0.1 up"; exec.start += "/sbin/ifconfig epair${ip}b inet $ip_addr up" ; exec.start += "/sbin/route add default $ip_route " ; exec.start += "/bin/sh /etc/rc"; exec.poststop = "ifconfig bridge0 delem epair${ip}"; exec.poststop = "ifconfig epair${ip}a destroy " ; persist; devfs_ruleset=5 ; allow.raw_sockets=1 ; allow.socket_af = 1; } -- You are receiving this mail because: You are the assignee for the bug.