From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 403A8138CA3 for ; Sat, 14 Mar 2015 13:02:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5CFDE09C3; Sat, 14 Mar 2015 13:02:20 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 13FB3E0943 for ; Sat, 14 Mar 2015 13:02:20 +0000 (UTC) Received: from marcec.fritz.box ([93.181.44.4]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Ln8gj-1ZBsDH316z-00hJR5 for ; Sat, 14 Mar 2015 14:02:18 +0100 Date: Sat, 14 Mar 2015 14:02:16 +0100 From: Marc Joliet To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Systemd migration: opinion and questions Message-ID: <20150314140216.009128b9@marcec.fritz.box> In-Reply-To: <20150301192002.175ba457@marcec.fritz.box> References: <20150224211545.50495cc0@marcec.fritz.box> <20150225085035.4618f4cd@marcec.fritz.box> <20150225192508.30cb175a@marcec.fritz.box> <20150301134821.205b6f69@marcec.fritz.box> <20150301192002.175ba457@marcec.fritz.box> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/Bhizt_he7AuLgwzX+StcE=I"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:tQqNF9yRxyfrzkavOG8wfGke0alXZAjzj3MZUNCQOYUJ4n3+6/7 KBcCSbB34Sp8KZyoqeUxGwKMNcLIHrvJsUxD5noc8SQC3JpU8ICWINAsruC0nKc2P5FJLJ1 hAZmz0c67rm0MhJSG0EpJHxhkRKKXxva68Vi/B8x/mhy0L5r0xAfw7rtE4onbo0jNGSNueG B1YS3etjWpF2MFq2kwiOA== X-UI-Out-Filterresults: notjunk:1; X-Archives-Salt: 3a5f035e-320a-4380-a990-9032905c3146 X-Archives-Hash: 55215c5268a9a5d8dc1a20fa1434b33e --Sig_/Bhizt_he7AuLgwzX+StcE=I Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Sun, 1 Mar 2015 19:20:02 +0100 schrieb Marc Joliet : [...] > But actually, while putting off finishing this email, I came to the reali= sation > that I could of course use WantedBy=3D in [Install], and following that i= dea I > ended up with the following [Unit] and [Install] sections: >=20 > [Unit] > Description=3DRun hourly backups (timer) > Requisite=3Dmedia-MARCEC_BACKUP.mount > BindsTo=3Dmedia-MARCEC_BACKUP.mount > After=3Dmedia-MARCEC_BACKUP.mount >=20 > [Install] > WantedBy=3Dtimers.target > WantedBy=3Dmedia-MARCEC_BACKUP.mount >=20 > So the mount point and the timer both depend on each other (with the moun= t unit > starting first), so the mount tries to start the timer and vice versa, bu= t only > the timer fails if the mount point doesn't exist. And the BindsTo sees t= o it > that the timer disappears if the mount does. Preliminary tests show that= it > works: unmounting with udiskie shows that the backup timer disappears, an= d it > re-appears after mounting the file system again. >=20 > I'll have to see what the behaviour is during a cold boot. The Requisite > dependency on the mount point *should* make the Restart line in the > corresponding service obsolete, since the WantedBy should make the timer = start > once the mount point shows up. I could probably alternatively use > ConditionPathIsMountPoint instead, but I think I prefer the timer failing. [...] Just FYI: I undid that fairly quickly since BindsTo is a superset of Requir= es, thus systemd waits for 1m30s for the mount point to show up. Ouch. --=20 Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup --Sig_/Bhizt_he7AuLgwzX+StcE=I Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVBDFZAAoJEL/Q5oYsiHj0v2YP/jZupNAgpFdivVVcapelUXS4 y4Ox9w5k/g+1Jt7N0/AtT0WXoN03pgWNq03sgydgWI0Hbbqx6R/4krfXh9HI8eO5 JGIQXgfAaeEZ5ZDvw6vMUaBJLQ6o2VpX3h9pqLYmeuZzqUCC3pYWMOxtIVDiZCC0 7d0wXTEyQErMlGDHxJskJbLdAfgjLC8yAZo99tOJsmRcmepgts3G++q5XLv6x/EP vG7Nn9MIT88NpYkIHKMHKy5S8/mE/Tf9AGXJNUdeSdm6nprgIdMWEC5FmXoYUs0A EZ5fUODEe96VqMNvO0tMzv61pWtlr1/mjDi+w+yiQglelAWvyzfXlY+wWgTZokBK 7GqhILUAsmLRMH86CyGgy5yQ8qKfdFWXrqhfZN/zJLLFF9nIr1Mt2Hxr2f/sgKZb pWN6hXblvLJn6ny7kiIHGp/BF+z5mndua4PYdkjYuHqZayWPzHzMgRdYn7Qfwp61 sxK6lMDHxozo5aCq8qBo21Is9ZD2Ms60LpzrzWKpZ7yrR4OCjHqFUvDxdo/5/O9z D4DSRLSw7xJFWfFegppc1mQG58Is64W9Q7u3B+jWDA5guvFxaPozK+H9Pnfnsnkh bS6epq3wGUJccFRU1QPC7Cj4YLWFZgzo6E/EZO4W+7txh4bxtyyUQCElrmInIAax /5OSd4y5HfuS+Eruycdq =xbML -----END PGP SIGNATURE----- --Sig_/Bhizt_he7AuLgwzX+StcE=I--