From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jFpZF6311z30JV for ; Thu, 29 Oct 2026 15:49:25 +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 (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jFpZD5J9rz2xFR for ; Thu, 29 Oct 2026 15:49:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4jFpZC4s76z1qS; Thu, 29 Oct 2026 15:49:23 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1793288963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k8QvI2NQoyR9cMVTH8hq7GpU8otW3dUyU/ZE8mDi4eQ=; b=eX94NBdbPWjJFur/lZTNbRPWf/jqUouRTXcbBmj2wPZPwkVkvIwqpnt/XMkBkC5wX4xJDt kaEUEMss9VIe/UAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1793288963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k8QvI2NQoyR9cMVTH8hq7GpU8otW3dUyU/ZE8mDi4eQ=; b=CXBJ61nBWSbTjYce2pZ+0Wv52JpjDeWB3oC38Nvk0fosRbADeu+ev1bZGiseKcEQzKMbzh YIbEc4P4WHNm45p1ZEzK0W8uU1xrUYzolWaAP2bSH0V01ztKBNIjhGTi2fKQ3Hg9Tr1qdU eLD/EDgzmHoMsbyvSy9+KNrnkQqud/cfaAv3YFfqdtuIhA096+O5d8dCcCBidp9xtM4d12 k6FFjGNv1PIioX+fy0rDhZ1N9o/mYE1dZi6J5rfFqNIlGI32cHOSSEsbPRdpI4uR6NTnYF n1iWT009Ox8E9inRnTiPCrffCEhd61UfoJRAOChjWVHeIhmzt29Xse1WayxxEg== Content-Type: text/plain; charset=us-ascii Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Re: [PATCH] systemd: Standartize on Wants=/After= for network From: Michael Tremer In-Reply-To: <20261029121134.93697-1-valter.jansons@gmail.com> Date: Thu, 29 Oct 2026 15:49:22 +0000 Cc: location@lists.ipfire.org, Stefan Schantl Content-Transfer-Encoding: quoted-printable Message-Id: <328A7BD5-1C4F-43E2-941D-D351ED2587AC@ipfire.org> References: <20261029121134.93697-1-valter.jansons@gmail.com> To: Valters Jansons Hi Valters, Thanks for the patches. I applied the two Debian ones (psycopg3 and = docbook-xml), but I have held back the systemd one. It sets Wants=3Dnetwork.target together with = After=3Dnetwork-online.target. That doesn't work as intended: After=3D = only orders the unit relative to network-online.target if something else = pulls it in, and nothing does. So the updater can still start before the = network is up. Your commit message says the aim is for the updater to be = stopped before the network goes down, which is a shutdown-ordering goal. = That is already covered by ordering against the target. For a service that needs the network, the usual pair is: Wants=3Dnetwork-online.target After=3Dnetwork-online.target =20 I checked this with systemd-analyze verify and it passes cleanly. Could = you resubmit it that way, with the commit message adjusted? Or tell me = if you'd rather I apply it with that change myself. Best, Michael > On 29 Oct 2026, at 12:11, Valters Jansons = wrote: >=20 > Current Requires=3Dnetwork.target is very strict. Standard practice is = to > set it as Wants=3D instead as a lighter "should". The application can > then see what is actually going on. >=20 > Furthermore, an After=3D should be in place so that Systemd properly = stops > the updater prior to bringing the network stack offline. >=20 > Signed-off-by: Valters Jansons > --- > src/systemd/location-update.service.in | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/src/systemd/location-update.service.in = b/src/systemd/location-update.service.in > index 50ba01f..b491a12 100644 > --- a/src/systemd/location-update.service.in > +++ b/src/systemd/location-update.service.in > @@ -1,7 +1,8 @@ > [Unit] > Description=3DAutomatic Location Database Updater > Documentation=3Dman:location(1) = https://man-pages.ipfire.org/libloc/location.html > -Requires=3Dnetwork.target > +Wants=3Dnetwork.target > +After=3Dnetwork-online.target >=20 > [Service] > Type=3Doneshot > --=20 > 2.56.0 >=20 >=20