From nobody Sun Jun 20 16:50:30 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 8E8A111D3383; Sun, 20 Jun 2021 16:50:33 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G7JZ13Qzzz4R51; Sun, 20 Jun 2021 16:50:33 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: by mail-ed1-x52a.google.com with SMTP id s6so15641265edu.10; Sun, 20 Jun 2021 09:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D6K1ABJTxz/oOzutfjz2S8oxlHL06HW+h2URsQcjz9g=; b=PLq+8eBKJgVKPJVrLbFnhXMc8pPR9UsG1E985wZBynGwyeBIzMyxFfhHwlHu0gtSgn 4yUbUQOnkER2sioNky//JqHEZJe/BY5nyQKDy2F0xDlGfaGThPt5wnGpeb7Z2otN/MUD NJQqCYeNnInSCroGQIIBp0X05+MILh9b8DzVH+pBdodmU75iVQZNR5h3KcszL6KCu6O4 nRqn+ToO9yPg7xF+ishyEv9gdUog5Xe677N/mnMu5v2tm6RNtmxBwW5TmZsIArMnqyiC U+sKDJGGhk4wcRspcn+UCY/CkrJA0QoQF7fgkBa4ptfcLz9xkRJuHmmuKqteWNp1cSCN /OLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D6K1ABJTxz/oOzutfjz2S8oxlHL06HW+h2URsQcjz9g=; b=aKpMMkHp2vY/QnOZAIfoaS00JORJKkOw6K73E+OjIE/ZEh/Rytt5nYae38ytji2e5A wOttZSFH3H3lFD9aGdpUIdXdCFy0//UZAAkbzOBL75f2Sdax1CViAmpt++Q+Jiz4n9Wm sPc+cvH8NNA96e6Ak8vM/r07BNB4rz+YyNyNlGTVp/ucDWawzxL/bFPB5RjY8j0+INJP nrI+K9I3MWn6QUhOo599xwhpxh/YXNV/717wyfopXD6e/mzlg4rnI1azl6NGq/LXo4DN ypqkC7xdD4uv+wgcV+IOBteUnAKZWbmWfJfFriNqDdZTbvR7YzLTT8MGhE+i/Op2gpuo ld2w== X-Gm-Message-State: AOAM530DU5P0TFIL8ddufpLX3wUSuqKJggVovncXIIP+nRebevycVPro Q7dGf3JGf1aczIcm3Z3bjy/20DomB6hZyJSW X-Google-Smtp-Source: ABdhPJzzmnqlj51eo3yJFLB8I7mgi9go1qwx/IMcX5GojAkWivG3ClQm7w0uRR+qQBZscv6OWjsJBw== X-Received: by 2002:a50:a6db:: with SMTP id f27mr9337999edc.18.1624207832186; Sun, 20 Jun 2021 09:50:32 -0700 (PDT) Received: from rimwks.local ([2001:470:1f15:3d8:7285:c2ff:fe37:5722]) by smtp.gmail.com with ESMTPSA id s18sm3878492ejh.12.2021.06.20.09.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 09:50:31 -0700 (PDT) From: Rozhuk Ivan X-Google-Original-From: Rozhuk Ivan Date: Sun, 20 Jun 2021 19:50:30 +0300 To: Ian Lepore Cc: freebsd-net@freebsd.org, freebsd-hackers@FreeBSD.org Subject: Re: How to run script on network address change? Message-ID: <20210620195030.7ddad8b9@rimwks.local> In-Reply-To: <29b67c76692658ba3618a2b1f9d62a7b77501247.camel@freebsd.org> References: <20210620165215.0f3dd15c@rimwks.local> <29b67c76692658ba3618a2b1f9d62a7b77501247.camel@freebsd.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) 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-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4G7JZ13Qzzz4R51 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, 20 Jun 2021 08:42:46 -0600 Ian Lepore wrote: > > 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. Thanks, I see some forum posts with this.