From owner-freebsd-current@FreeBSD.ORG Sun Apr 20 01:37:07 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E54EA9D8 for ; Sun, 20 Apr 2014 01:37:07 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE61E16E8 for ; Sun, 20 Apr 2014 01:37:07 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id as1so2701315iec.25 for ; Sat, 19 Apr 2014 18:37:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=YTsgQzekHlGoIUGG2plGxc//8a0ZJOHH7SVq/9nC6cs=; b=AJRXkzpGPkIr0xkF4k9LShGhFymdlpJK/NR0BE6z0nz9y3UPqqihKjiYGD3CB3ytmu cCKl4+aJX0k6AzToxQjPQuefm2eeWw8YT8hA5IbZTpuKCT0GKM0yDLf2hpDoZrybCLpD AbCodkpVxVT1qFp0M1bzBh3vLWSZV34iVVTWfudXsaeiSlBs4MCxBVgeDiZ0shehM3ws N/2pIilUHxaCGVVE/KmrMVvrhhrdEnVK7puLXLNBsVbZHIs5E0pt6V31io53+lXk59Sq qs/03743HATmQjjIQQYC+KE3sf+kghZtNr5ipbLOjcVFCInwov7Z41w2XGk+3cbzclF4 kEAQ== X-Gm-Message-State: ALoCoQmAJvDwcX51mDk8gCB2dsnN0tpxE7/ePB5himxMa9B+TuZEM7y/xLbs629EyZgF5YamCekv X-Received: by 10.50.112.167 with SMTP id ir7mr13562132igb.27.1397957821179; Sat, 19 Apr 2014 18:37:01 -0700 (PDT) Received: from [10.0.0.119] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id vc5sm9184592igb.3.2014.04.19.18.37.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Apr 2014 18:37:00 -0700 (PDT) Sender: Warner Losh X-Google-Original-From: Warner Losh Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Ordering for network-sensitive rc scripts From: Warner Losh In-Reply-To: Date: Sat, 19 Apr 2014 19:36:59 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <21178648-68BE-41D7-8D6D-246A8CE167AB@gmail.com> References: To: David Chisnall X-Mailer: Apple Mail (2.1874) Cc: "FreeBSD-CURRENT@freebsd.org Current" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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, 20 Apr 2014 01:37:08 -0000 On Apr 17, 2014, at 2:21 AM, David Chisnall = wrote: > For a little while, I've had an issue with the machine that sits on = the edge of my network deciding to start avahi as soon as a network is = available, meaning that it then runs mDNS advertisements on the external = interface and not the wireless one, requiring a manual restart once the = machine boots. I'm now seeing something similar with pf - it manages to = start before the external interface comes up and so silently ignores all = of the rules for routing packets off the network. >=20 > Do we have a mechanism for stating that certain services should not be = started until ALL of the interfaces are up, rather than just the first = one? Or even of restarting them when a new network appears? devd network events will allow you to do this on a per-network basis. = The script that you run can then determine if the relevant criteria are = in place and then do something... Warner