From owner-freebsd-current@freebsd.org Thu Oct 6 07:33:46 2016 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 89719BD3FFB for ; Thu, 6 Oct 2016 07:33:46 +0000 (UTC) (envelope-from lists@peter.de.com) Received: from elsa.gfuzz.de (static.173.164.46.78.clients.your-server.de [78.46.164.173]) (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 4EF8964C for ; Thu, 6 Oct 2016 07:33:45 +0000 (UTC) (envelope-from lists@peter.de.com) Received: from localhost (localhost [127.0.0.1]) by elsa.gfuzz.de (Postfix) with ESMTP id BEAA8100128 for ; Thu, 6 Oct 2016 09:27:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at elsa.gfuzz.de Received: from elsa.gfuzz.de ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GKWFbWUe1qsF for ; Thu, 6 Oct 2016 09:27:55 +0200 (CEST) Received: from mail.opdns.de (ipbcc2386a.dynamic.kabel-deutschland.de [188.194.56.106]) (Authenticated sender: oliver@gfuzz.de) by elsa.gfuzz.de (Postfix) with ESMTPSA id 20607100072 for ; Thu, 6 Oct 2016 09:27:55 +0200 (CEST) Date: Thu, 6 Oct 2016 09:27:53 +0200 From: Oliver Peter To: FreeBSD CURRENT Subject: Re: CURRENT: "service netif restart" looses default route Message-ID: <20161006072753.GA11735@mail.opdns.de> References: <20161005184748.01aca03e.ohartman@zedat.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005184748.01aca03e.ohartman@zedat.fu-berlin.de> X-Operating-System: Linux 4.4.16-1-pve x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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, 06 Oct 2016 07:33:46 -0000 On Wed, Oct 05, 2016 at 06:47:48PM +0200, O. Hartmann wrote: > > Today, I checked on two servers of ours running both a recent CURRENT (i.e. FreeBSD > 12.0-CURRENT #43 r306701: Wed Oct 5 06:40:40 CEST 2016) via "service netif restart" the > upcoming network and realised that the default route is lost then! > > I'm able to config the route via "service routing restart" - or manually as I did > otherwise. But I recall that I did a simple "service netif restart" in 11-CURRENT > recently and that worked. > > Has there been a change? What is now the official way to restart network? Since the past couple of years on every new FreeBSD I put this in motd for my linux colleagues and coworkers: Network: To apply changes you have made to the network: # /etc/rc.d/netif restart && /etc/rc.d/routing restart Perhaps we could introduce a wrapper to be used with: # service network restart oliver@local ~ % cat /etc/rc.d/network #!/bin/sh # PROVIDE: network # REQUIRE: netif routing # KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr name="network" start_cmd="network_start" stop_cmd="network_stop" network_start() { /etc/rc.d/netif start /etc/rc.d/routing start } network_stop() { /etc/rc.d/netif stop /etc/rc.d/routing stop } load_rc_config $name run_rc_command $* -- Oliver PETER oliver@gfuzz.de 0x456D688F