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 A8E13138CA3 for ; Sat, 14 Mar 2015 14:01:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 24A8DE0A43; Sat, 14 Mar 2015 14:01:52 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 5262AE09BB for ; Sat, 14 Mar 2015 14:01:51 +0000 (UTC) Received: from marcec.fritz.box ([93.181.44.4]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M35iN-1ZNVJS3BiB-00srJS for ; Sat, 14 Mar 2015 15:01:49 +0100 Date: Sat, 14 Mar 2015 15:01:43 +0100 From: Marc Joliet To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: Systemd migration: opinion and questions Message-ID: <20150314150143.67c9a316@marcec.fritz.box> In-Reply-To: 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_/GP=LMPaJvkYBpl_9LOZj1Zn"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:COULx8gaDorA+Lm2tVK8IcuahkNnxTzRxGgltxcOCJaJ1b1k7Pt 54eNevI7lyR9i5VET+rQbOJv0AVgcLDaObyn93aRrLTUyMvW/JoNyQycjYMrU5/NBq8SpJC V8aQwl29HTPozdd28eVCcSx0KeSo02zt9CNCzQgMWIgIyFPjJvrafSCUbnsHMdLKF3Bldw3 No7h3MWJ9l3t5Oy7IfRfg== X-UI-Out-Filterresults: notjunk:1; X-Archives-Salt: 91393317-87f0-40cf-b046-fbb640bcd592 X-Archives-Hash: dff19efb0c993cbe17426b93fd03da01 --Sig_/GP=LMPaJvkYBpl_9LOZj1Zn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Mon, 2 Mar 2015 05:13:26 +0000 (UTC) schrieb Duncan <1i5t5.duncan@cox.net>: > Rich Freeman posted on Sun, 01 Mar 2015 14:13:53 -0500 as excerpted: >=20 > > On Sun, Mar 1, 2015 at 1:20 PM, Marc Joliet wrote: > >> > >> Regardless: thoughts? > >=20 > > I'd probably just do this: > >> Am Sun, 1 Mar 2015 08:34:19 -0500 schrieb Rich Freeman > >> : > >>> > >>> The timer keeps running if you set the dependency on the service. So, > >>> next time the timer runs, it will try again. You might want to just > >>> set an hourly job and have it check for a successful run in the last > >>> day or whatever. > >>> > > You could of course trigger this from either the mount or hourly. > > Anytime you mount the drive or every hour systemd will run the service, > > and the service will see if it managed to do a backup/etc in the last > > day/week/whatever, and then run if appropriate. >=20 > This is actually how I setup several former cron-jobs as systemd timers,= =20 > here, based on an hourly check somewhat similar to what most crons=20 > (including gentoo's for over 10 years now and mandrake's before that) are= =20 > actually setup to do to get around the fact that cron won't on-its-own=20 > trigger after restart if the machine was down or cron not running when=20 > the configured time for a job ran. >=20 > Here's how I have it setup here. Note that my initials are jed, and I=20 > use them regularly as a prefix/suffix to denote custom configs (here,=20 > systemd units) I've created myself, as opposed to those shipped in=20 > whatever package. >=20 [GIGASNIP thorough explanation ;) ] I pretty much thought that's what Rich was alluding to, but thanks for show= ing that it's not *that* much extra complication (and how one can use a target = unit for this). I never really looked at how these things are done by run-crons = (and similar). Just for completeness: I use fcron instead of vixie-cron, so some of the st= uff systemd timers can do was already known to me. For example, in fcron, lin= es can start with "@" to denote that they run relative to system startup (e.g,= "@ 5" for "every five minutes after boot). The "first" option specifies how l= ong to wait before starting an entry for the first time, analogous to "OnBootSe= c". Anyway, like I mentioned before, I'll revisit this once I've solved the HDD problem (or not, if it turns out to be a firmware issue). Greetings --=20 Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup --Sig_/GP=LMPaJvkYBpl_9LOZj1Zn Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVBD9MAAoJEL/Q5oYsiHj09ZkQAJnOGq8LaE0mey+jZxmtoI92 kv/M1Yxo8vt0IaiqJyF7ox9zCGAs8Q7+52zKJjhFne2nVWi3v6GLK7uKFcoCI9nE DCiAkkxyDR2N7chIwZQnXATaRh2bv5UygxIPVeDBekhtYJTSRUllS2vmKNByDj89 zoRHd1qxVOS8hKWeoZlGh+jPES4wIiLvf47UQDa4s3dg1uvoeNyOIF3Yx5K+JgEq +hS8YGCfVgD4c6aZCTk8vF1vr2411gpk6ceMmpZbbvAqU/R8jCNTriWv1nKyj1Pq Vti4bHsgftyGR5rdIbo5eJB/SBEOF6xl2868kZj01gIg/SRes2ec2DlfublBbNXG mLcdgBzDxjBuyuAAYZbHIot2BZ4EZk+uOp64tzay4s5GpH3D0mis0mWlvM50EB6A w4YgIn/659raQau/D1V0XXFetrPIE1Dkm3AYhmaJzFDla+HW+vF01O5/EnZJcp6r xgbymHtU9GhZrgXJIWS5ExRZB8Lr0KKpd5JZSpKAlZ245a7CW9iqElmoJhuPiUp/ im30FMHBEo3Q9i0vVgCgMrFNGDWi0ut4SKD+CRRVvvCGaDo7QOnTFnII3jG+H8GD n2LEuXR+kwjczIBSyprEXtD/bs3/6823R46w81OxkUVziVhSs5stwEoDQ9h8roGP wvxvg4jHmKjrZyC/HhIT =q8Ad -----END PGP SIGNATURE----- --Sig_/GP=LMPaJvkYBpl_9LOZj1Zn--