From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: network@lists.ipfire.org Subject: [network] [PATCH 2/3] ipv4-static: Remove routing information from databases when shutting down a zone. Date: Wed, 25 Jan 2017 14:48:20 +0100 Message-ID: <20170125134821.15442-2-stefan.schantl@ipfire.org> In-Reply-To: <20170125134821.15442-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2477434612268232040==" List-Id: --===============2477434612268232040== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Otherwise the script will try to use this route again and crash because the a= ddress space is not longer available. Signed-off-by: Stefan Schantl --- src/hooks/configs/ipv4-static | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/configs/ipv4-static b/src/hooks/configs/ipv4-static index 72b748c..cb00252 100644 --- a/src/hooks/configs/ipv4-static +++ b/src/hooks/configs/ipv4-static @@ -147,7 +147,10 @@ hook_down() { error "Zone '${zone}' doesn't exist." exit ${EXIT_ERROR} fi -=09 + + # Remove routing information from database. + db_delete "${zone}/ipv4" + zone_config_settings_read "${zone}" "${config}" =20 ip_address_del ${zone} ${ADDRESS}/${PREFIX} --=20 2.9.3 --===============2477434612268232040==--