Message ID | 20221201172318.3166615-13-michael.tremer@ipfire.org |
---|---|
State | Accepted |
Commit | a22e3c8ec7e0411a6976fcc43dc132395e5cf0f7 |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4NNNG403BQz3xkl for <patchwork@web04.haj.ipfire.org>; Thu, 1 Dec 2022 17:23:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NNNFq2Bqjz2vs; Thu, 1 Dec 2022 17:23:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NNNFm6ycXz30D0; Thu, 1 Dec 2022 17:23:24 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4NNNFl0vswz2yxp for <development@lists.ipfire.org>; Thu, 1 Dec 2022 17:23:23 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "michael.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NNNFk70DKz2PK; Thu, 1 Dec 2022 17:23:22 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4NNNFk1hXXzTjnP; Thu, 1 Dec 2022 17:23:22 +0000 (UTC) From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 13/29] dhcpcd.exe: Flush any configured IP addresses on shutdown Date: Thu, 1 Dec 2022 17:23:02 +0000 Message-Id: <20221201172318.3166615-13-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> References: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Cc: Michael Tremer <michael.tremer@ipfire.org> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[01/29] libgudev: New package
|
|
Commit Message
Michael Tremer
Dec. 1, 2022, 5:23 p.m. UTC
This allows us to start with a fresh interface every time dhcpcd is
being restarted.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
src/initscripts/networking/dhcpcd.exe | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networking/dhcpcd.exe index be6d63708..f79d5d16d 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -84,6 +84,11 @@ dhcpcd_down() run_subdir ${rc_base}/init.d/networking/red.down/ fi fi + + # Remove any configured IP address from the device + ip addr flush dev "${interface}" &>/dev/null + + return 0 } # Called when dhcpcd relies on a third party to configure an IP address