From nobody Sun Jun 20 14:42:46 2021 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 759C011CB349 for ; Sun, 20 Jun 2021 14:42:50 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound4s.ore.mailhop.org (outbound4s.ore.mailhop.org [54.185.97.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G7Fkf0frVz3jHJ for ; Sun, 20 Jun 2021 14:42:49 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1624200168; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RonOvPFAMuGJRRic2ft8y898iRpkJlnTg8mIbV102oLMuyjDxLQZ8/wVFONveWf4JcZLoiZHFcxiJ wx6m7jgRkK2QkqjxAqHu1GDs88J+9FaiHzW/2/w3y63qHgkiXS6l6YaDbpXd3pxOhV9RhH7z8t/Sj+ YPbk6M61NE21XbQ/kBIfTfHRjyy/a6oJ/d6xSkncV/cRnFAuCv3OCBQ+ZG9PndlPuK0IxDATlaOjJS MCiLBjuCS2e3UQu5riOoAza7OanKp/cw3saoz12Q7FRWxfdDHU2a7Zw5y4yUGYPbPT/V64tzGnEReN Di2sst0OkRjNOHtYh+N2Jg9Umf7kwxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=2xQ9vrsLKjMTc98+DC3ZZzGVV6duRERAs8Il5jxLIoo=; b=OCTxshl1iVcdFHns2Wv6Bk3Dmh+ddQdnHPmhrQR0PbUvpDx7HeHwvwinZ8oFUwLrlRoLHxZrtENyJ zH/Gabyhbkr79kbTqfNTSTtEar4Fs86ujyP7gQavB3scwGfYzWokHZTwLXIJkSwQqPJ5gaFpEqS8Vu PRnITluQFFqvHEdgKV6PCSLbonTTimzP7q/YegbKSWLgHJbZVeYwOkaFBHXgnKRwPmw6NZaMg54wKy kfbvorhdoXtwLUqdOJc4HCmYJxKWtEOusuTLJF4bEiUqMa+Sc2j9Bb4M79lRHnKY1s+jw6bUlitBnx H5lWKJyfpF1z8+1Vi3j3iUAv3nuTaFA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=2xQ9vrsLKjMTc98+DC3ZZzGVV6duRERAs8Il5jxLIoo=; b=qL5F0erldyQNQBBXliOmxJEx27p8WGhiEcur62i2SNRG2+FsOhflFWlDxmXBF1mdFFjV9PXs3lWnf x6l4bzrpYifCGYQqmmVF7H5uAw4lTWN377tWe1fd8rtRc3emsGpQXFQucYlnMkpnd1TLc2Tr8naN0M SHuKEmC0iAqFhPkTqTwuZo5ZYJp8fxphmWe0u/bXqhVxzu8wIzoirk8zveRFPSgBLaom8IicYkZgUl SjxuoIuNPNLeNGKyj25ikhvRfxEi1ISeqhYWnYGHNf7IJlM45jq9vrBF7LSewG5+2nePywliFCDnbs 5KLCUEij8jQRjI8DubDooJB8+lJzGng== X-Originating-IP: 67.177.211.60 X-MHO-RoutePath: aGlwcGll X-MHO-User: c75cbfbd-d1d5-11eb-a657-89389772cfc7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id c75cbfbd-d1d5-11eb-a657-89389772cfc7; Sun, 20 Jun 2021 14:42:47 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 15KEgkUk002831; Sun, 20 Jun 2021 08:42:46 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <29b67c76692658ba3618a2b1f9d62a7b77501247.camel@freebsd.org> Subject: Re: How to run script on network address change? From: Ian Lepore To: Rozhuk Ivan , freebsd-net@freebsd.org, freebsd-hackers@FreeBSD.org Date: Sun, 20 Jun 2021 08:42:46 -0600 In-Reply-To: <20210620165215.0f3dd15c@rimwks.local> References: <20210620165215.0f3dd15c@rimwks.local> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4G7Fkf0frVz3jHJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, 2021-06-20 at 16:52 +0300, Rozhuk Ivan wrote: > Hi! > > > I have FreeBSD 13@amd64 router with DHCP client on uplink. > > How to run script on IP address change? > > > I do not see events from devd, only: > !system=IFNET subsystem=em3 type=LINK_DOWN > !system=IFNET subsystem=em3 type=LINK_UP > > You could use /etc/dhclient-exit-hooks script to take action after an IP address is bound. See the manpage for dhclient-script for more info. -- Ian