From owner-freebsd-current@FreeBSD.ORG Thu Dec 20 13:27:51 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 795B287B; Thu, 20 Dec 2012 13:27:51 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 0F02D8FC12; Thu, 20 Dec 2012 13:27:51 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 74CB23592F8; Thu, 20 Dec 2012 14:27:50 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 5F3852848C; Thu, 20 Dec 2012 14:27:50 +0100 (CET) Date: Thu, 20 Dec 2012 14:27:50 +0100 From: Jilles Tjoelker To: Kimmo Paasiala Subject: Re: ipv6_addrs_IF aliases in rc.conf(5) Message-ID: <20121220132750.GB99616@stack.nl> References: <50D1C553.9060100@wasikowski.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 13:27:51 -0000 On Thu, Dec 20, 2012 at 01:04:34PM +0200, Kimmo Paasiala wrote: > A question related to this for those who have been doing work on the > rc(8) scripts. Can I assume that /usr/bin is available when > network.subr functions are used? Doing calculations on hexadecimal > numbers is going to be very awkward if I can't use for example bc(1). You cannot assume that /usr/bin is available when setting up the network. It may be that /usr is mounted via NFS. You can use hexadecimal numbers (prefixed with 0x) in $((...)) expressions. In FreeBSD 9.0 or newer, sh has a printf builtin you can use; in older versions you can use hexdigit and hexprint from network.subr. -- Jilles Tjoelker