From owner-freebsd-current@freebsd.org Sun Oct 25 19:39:53 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44ADE81AE for ; Sun, 25 Oct 2015 19:39:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16C4C1C4A; Sun, 25 Oct 2015 19:39:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pabuq3 with SMTP id uq3so662339pab.0; Sun, 25 Oct 2015 12:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f1igTjV7JMRm+lw7DdhNKnhjytHqNSDl9MoPp8W3dYE=; b=Ef3bGJhbNzgQ/hK0wrTH18gPxjvGP0Ffi0l5nyKMv0cWuPBCVd2sF5WUVzrfk9un4t btxN/o3kukYkWQoQnrnkBnDJXctRV6O0ybskjl1kCFVXu5GZUhnFkUkBz1R0rTJSvtp7 x+JZbcvVfun6CU47dvd02wOGR4FSgsq5X4Z5ySqf9SRcypwoDhWikZ1p4UFzwfnKpNqe MVVdr5O3WKxDsYq33MYmI4P31LJVNc1KELk2YbaUTn3YZFRgYX2kkEOkELUhrbsKjcWj 00bjxow5/C7sFFyl4rD8917bIKdcdaevxLTizoMHl3dcuMRrDGA3aLYEPVbo7uW5PodH 4C/Q== X-Received: by 10.68.125.225 with SMTP id mt1mr17736474pbb.168.1445801992693; Sun, 25 Oct 2015 12:39:52 -0700 (PDT) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id bo5sm29802688pbb.76.2015.10.25.12.39.52 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Oct 2015 12:39:52 -0700 (PDT) Subject: Re: What changed in rc.d infrastructure in last months? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 From: NGie Cooper X-Priority: 3 (Normal) In-Reply-To: Date: Sun, 25 Oct 2015 12:39:51 -0700 Cc: freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: <28FF29D6-A2D9-46C0-A419-DB433BB9F54A@gmail.com> References: <16610120144.20151025222025@serebryakov.spb.ru> To: lev@FreeBSD.org X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 25 Oct 2015 19:39:53 -0000 > On Oct 25, 2015, at 12:30, NGie Cooper wrote: =E2=80=A6 > 445 # hostapif if > 446 # Returns 0 if the interface is a HOSTAP interface and 1 = otherwise. > 447 hostapif() > 448 { > 449 local _tmpargs _arg > 450 _tmpargs=3D`_ifconfig_getargs $1` > 451=20 > 452 for _arg in $_tmpargs; do > 453 case $_arg in > 454 [Hh][Oo][Ss][Tt][Aa][Pp]) > 455 return 0 > 456 ;; > 457 esac > 458 done > 459=20 > 460 return 1 > 461 } Here=E2=80=99s an example of how this works, by the way: $ sh find_hostapifs.sh wlan1 is! $ cat find_hostapifs.sh . /etc/rc.subr load_rc_config . /etc/network.subr for i in em0 wlan0 wlan1; do hostapif $i && echo "$i is!=E2=80=9D done $ grep ^ifconfig /etc/rc.conf ifconfig_em0=3D"inet W.X.Y.Z netmask 255.255.255.0" ifconfig_em0_ipv6=3D"inet6 accept_rtadv" ifconfig_wlan0=3D"inet 127.0.0.2/8" ifconfig_wlan1=3D=E2=80=9Chostap=E2=80=9D $ It=E2=80=99s documented here: On the other hand, if you want to configure your = wireless interface with hostapd(8), you need to add ``HOSTAP'' = to the ifconfig_ variable. hostapd(8) will use the settings from /etc/hostapd-.conf Cheers, -NGie=